I am trying to write some unit tests for a small web service written with Cherrypy and I am wondering what's the best way to figure out that the server has started, so i don't get connection refused if I try to connect too early to the service ?
Asked
Active
Viewed 262 times
1 Answers
4
I got it figured out:
cherrypy.engine.start(); cherrypy.server.wait()
it's the way to go.
Otherwise, I think you can get away with some tricks with
cherrypy.server.bus.states

hyperboreean
- 8,273
- 12
- 61
- 97