diff options
Diffstat (limited to 'service/test/functional/features/environment.py')
-rw-r--r-- | service/test/functional/features/environment.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py index 537cd969..4c9af63e 100644 --- a/service/test/functional/features/environment.py +++ b/service/test/functional/features/environment.py @@ -18,25 +18,20 @@ import multiprocessing import logging from test.support.integration import AppTestClient from selenium import webdriver +from pixelated.controllers.features_controller import FeaturesController import pixelated def before_all(context): - pixelated.controllers.features_controller.FeaturesController.DISABLED_FEATURES.append('autoRefresh') + logging.disable('INFO') client = AppTestClient() + FeaturesController.DISABLED_FEATURES.append('autoRefresh') context.client = client - logging.disable('INFO') - - worker = lambda: client.app.run(host='localhost', port=4567, logFile=open('/tmp/behave-tests.log', 'w')) - context._process = multiprocessing.Process(target=worker) - context._process.start() - - # we must wait the server start listening - time.sleep(1) + context.call_to_terminate = client.run_on_a_thread(logfile='/tmp/behave-tests.log') def after_all(context): - context._process.terminate() + context.call_to_terminate() def before_feature(context, feature): |