wrote failing unit test for setting thred count on start_server

This commit is contained in:
Jeremy Johnson 2013-08-15 16:33:59 +08:00
parent 174bd15cb8
commit c8f24334d0

View file

@ -103,3 +103,15 @@ class ContextTest(Vows.Context):
def the_get_url_method_should_return_a_well_formed_url(self, topic):
expect(topic).to_equal('http://127.0.0.1:8085/')
class WithinAMultiThreadedServer(DjangoHTTPContext):
def setup(self):
self.start_server(threads=5)
def topic(self):
return self.server
def should_default_to_one_thread(self,topic):
expect(topic.thr.server._get_numthreads()).to_equal(5)