summaryrefslogtreecommitdiff
path: root/service/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/functional')
-rw-r--r--service/test/functional/features/environment.py22
-rw-r--r--service/test/functional/features/steps/data_setup.py4
2 files changed, 9 insertions, 17 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py
index cb9e0876..537cd969 100644
--- a/service/test/functional/features/environment.py
+++ b/service/test/functional/features/environment.py
@@ -15,27 +15,20 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import time
import multiprocessing
-
-from selenium import webdriver
-from test.support.integration_helper import SoledadTestBase
-import pixelated.runserver
import logging
-import pixelated.controllers.features_controller
+from test.support.integration import AppTestClient
+from selenium import webdriver
+import pixelated
def before_all(context):
- context.soledad_test_base = SoledadTestBase()
- context.soledad_test_base.setup_soledad()
-
- context.mailboxes = context.soledad_test_base.mailboxes
- context.app = pixelated.runserver.app
- context.app.mail_service = context.soledad_test_base.mail_service
pixelated.controllers.features_controller.FeaturesController.DISABLED_FEATURES.append('autoRefresh')
+ client = AppTestClient()
+ context.client = client
logging.disable('INFO')
- worker = lambda app, port: pixelated.runserver.app.run(host='localhost', port=4567,
- logFile=open('/tmp/behave-tests.log', 'w'))
- context._process = multiprocessing.Process(target=worker, args=(context.app, 4567))
+ 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
@@ -43,7 +36,6 @@ def before_all(context):
def after_all(context):
- context.soledad_test_base.teardown_soledad()
context._process.terminate()
diff --git a/service/test/functional/features/steps/data_setup.py b/service/test/functional/features/steps/data_setup.py
index 51c5f9b8..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.soledad_test_base.add_mail_to_inbox(input_mail)
+ context.client.add_mail_to_inbox(input_mail)