summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
Diffstat (limited to 'service/test')
-rw-r--r--service/test/functional/features/environment.py6
-rw-r--r--service/test/support/integration_helper.py10
-rw-r--r--service/test/unit/user_agent_test.py2
3 files changed, 10 insertions, 8 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py
index f65b11a6..86f43d7f 100644
--- a/service/test/functional/features/environment.py
+++ b/service/test/functional/features/environment.py
@@ -18,7 +18,7 @@ import multiprocessing
from selenium import webdriver
from test.support.integration_helper import SoledadTestBase
-import pixelated.user_agent
+import pixelated.runserver
def before_all(context):
@@ -26,10 +26,10 @@ def before_all(context):
context.soledad_test_base.setup_soledad()
context.mailboxes = context.soledad_test_base.pixelated_mailboxes
- context.app = pixelated.user_agent.app
+ context.app = pixelated.runserver.app
context.app.mail_service = context.soledad_test_base.mail_service
- worker = lambda app, port: pixelated.user_agent.app.run(port=4567, use_reloader=False)
+ worker = lambda app, port: pixelated.runserver.app.run(port=4567, use_reloader=False)
context._process = multiprocessing.Process(target=worker, args=(context.app, 4567))
context._process.start()
diff --git a/service/test/support/integration_helper.py b/service/test/support/integration_helper.py
index 0d5d1125..8f2b8192 100644
--- a/service/test/support/integration_helper.py
+++ b/service/test/support/integration_helper.py
@@ -23,11 +23,13 @@ from pixelated.adapter.mail_service import MailService
from pixelated.adapter.search import SearchEngine
from pixelated.adapter.tag_service import TagService
from pixelated.adapter.draft_service import DraftService
-import pixelated.user_agent
from pixelated.adapter.mail import PixelatedMail, InputMail
+import pixelated.runserver
from pixelated.adapter.pixelated_mailboxes import PixelatedMailBoxes
from pixelated.adapter.soledad_querier import SoledadQuerier
from pixelated.controllers import *
+import pixelated.config.app_factory as app_factory
+
soledad_test_folder = "soledad-test"
@@ -146,7 +148,7 @@ class SoledadTestBase:
SearchEngine.INDEX_FOLDER = soledad_test_folder + '/search_index'
- self.client = pixelated.user_agent.app.test_client()
+ self.client = pixelated.runserver.app.test_client()
self._reset_routes(self.client.application)
self.soledad_querier = SoledadQuerier(self.soledad)
@@ -168,8 +170,8 @@ class SoledadTestBase:
search_engine=self.search_engine)
tags_controller = TagsController(search_engine=self.search_engine)
- pixelated.user_agent._setup_routes(self.client.application, home_controller, mails_controller, tags_controller,
- features_controller)
+ app_factory._setup_routes(self.client.application, home_controller, mails_controller, tags_controller,
+ features_controller)
def get_mails_by_tag(self, tag):
response = json.loads(self.client.get("/mails?q=tag:" + tag).data)
diff --git a/service/test/unit/user_agent_test.py b/service/test/unit/user_agent_test.py
index 3572a387..bd875dcc 100644
--- a/service/test/unit/user_agent_test.py
+++ b/service/test/unit/user_agent_test.py
@@ -20,7 +20,7 @@ import sys
import pixelated.user_agent
from mockito import *
import crochet
-import pixelated.reactor_manager as reactor_manager
+import pixelated.config.reactor_manager as reactor_manager
import pixelated.adapter.pixelated_mail
import os