From c8f24334d06ddbfe5b5999a1f8e75233ccace3f6 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Thu, 15 Aug 2013 16:33:59 +0800 Subject: [PATCH] wrote failing unit test for setting thred count on start_server --- vows/context_vows.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vows/context_vows.py b/vows/context_vows.py index e62fc75..e74d52a 100644 --- a/vows/context_vows.py +++ b/vows/context_vows.py @@ -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) + +