diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-29 11:03:18 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:29 +0200 |
commit | 5dd256d5d5295dd889a4bf652561e0523e70aed9 (patch) | |
tree | 0567e5a6b4f59df009d9bd9dcf3098ceb910d7e7 /service/test/support | |
parent | 9ba07cc943f1d85664b70546404ee26b1313dcee (diff) |
Fixed all functional tests using crochet.
- Issue #420
- Added crochet as a test dependency
- crochet now executes twisted in same process,
in a background thread
Diffstat (limited to 'service/test/support')
-rw-r--r-- | service/test/support/integration/app_test_client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index db85f931..c6cd9936 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -103,9 +103,12 @@ class AppTestClient(object): d.addCallback(get_request_written_data) return d, request + def listenTCP(self, port=4567, host='0.0.0.0'): + reactor.listenTCP(port, Site(self.resource), interface=host) + def run_on_a_thread(self, logfile='/tmp/app_test_client.log', port=4567, host='0.0.0.0'): def _start(): - reactor.listenTCP(port, Site(self.resource), interface=host) + self.listenTCP(port, host) reactor.run() process = multiprocessing.Process(target=_start) process.start() |