summaryrefslogtreecommitdiff
path: root/service/test/functional
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-11-19 12:06:05 -0200
committerDuda Dornelles <ddornell@thoughtworks.com>2014-11-19 12:08:36 -0200
commita7e4c6238e29962653d2c53ad2887eab6e98b420 (patch)
treeca37991e2d72acc60d1d95ff05a6b9a21b663ef9 /service/test/functional
parent68a906b6eec347481a0b7aa4c60e24ff02f5c26e (diff)
better organization for integration test support classes
Diffstat (limited to 'service/test/functional')
-rw-r--r--service/test/functional/features/environment.py15
-rw-r--r--service/test/functional/features/steps/data_setup.py4
2 files changed, 9 insertions, 10 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py
index 5d481e25..537cd969 100644
--- a/service/test/functional/features/environment.py
+++ b/service/test/functional/features/environment.py
@@ -15,20 +15,19 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import time
import multiprocessing
-
-from selenium import webdriver
import logging
-from test.support.integration_helper import setup_test_app
-
-logging.disable('INFO')
-import pixelated.controllers.features_controller
+from test.support.integration import AppTestClient
+from selenium import webdriver
+import pixelated
def before_all(context):
pixelated.controllers.features_controller.FeaturesController.DISABLED_FEATURES.append('autoRefresh')
- setup_test_app(context)
+ client = AppTestClient()
+ context.client = client
+ logging.disable('INFO')
- worker = lambda: context.app.run(host='localhost', port=4567, logFile=open('/tmp/behave-tests.log', 'w'))
+ 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()
diff --git a/service/test/functional/features/steps/data_setup.py b/service/test/functional/features/steps/data_setup.py
index e3e9a389..4e349f05 100644
--- a/service/test/functional/features/steps/data_setup.py
+++ b/service/test/functional/features/steps/data_setup.py
@@ -13,10 +13,10 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-from test.support.integration_helper import MailBuilder
+from test.support.integration import MailBuilder
@given('I have a mail in my inbox')
def add_mail_impl(context):
input_mail = MailBuilder().build_input_mail()
- context.add_mail_to_inbox(input_mail)
+ context.client.add_mail_to_inbox(input_mail)