summaryrefslogtreecommitdiff
path: root/service/test/support/integration
diff options
context:
space:
mode:
authorZara Gebru <zgebru@thoughtworks.com>2016-12-02 15:25:23 +0100
committerZara Gebru <zgebru@thoughtworks.com>2016-12-02 15:25:23 +0100
commitb14833fbb56bcd5bff0750c16fd9214009b955be (patch)
treea1ec621dd5f76d756ac59b72a763a34a2c189387 /service/test/support/integration
parent688a8b42e8ab7c6d4529b6dda66f40eead07ad02 (diff)
[refactor] move app dir into public dir
Diffstat (limited to 'service/test/support/integration')
-rw-r--r--service/test/support/integration/app_test_client.py5
-rw-r--r--service/test/support/integration/multi_user_client.py4
2 files changed, 5 insertions, 4 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index 4e3758c5..c611fbd0 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -38,7 +38,7 @@ from leap.soledad.client import Soledad
from leap.bitmask.mail.adaptors.soledad import SoledadMailAdaptor
from pixelated.adapter.mailstore.leap_attachment_store import LeapAttachmentStore
from pixelated.adapter.services.feedback_service import FeedbackService
-from pixelated.application import UserAgentMode, set_up_protected_resources
+from pixelated.application import UserAgentMode, set_up_protected_resources, get_static_folder, get_templates_folder
from pixelated.config.sessions import LeapSession
from pixelated.config.services import Services, ServicesFactory, SingleUserServicesFactory
from pixelated.config.site import PixelatedSite
@@ -218,10 +218,11 @@ class AppTestClient(object):
services = self._test_account.services
self.service_factory.add_session('someuserid', services)
- self.resource = RootResource(self.service_factory)
+ self.resource = RootResource(self.service_factory, get_templates_folder(), get_static_folder())
provider = mock()
self.resource.initialize(provider)
else:
+ # TODO: write test for me (=
self.service_factory = StubServicesFactory(self.accounts, mode)
provider = mock()
bonafide_checker = StubAuthenticator(provider)
diff --git a/service/test/support/integration/multi_user_client.py b/service/test/support/integration/multi_user_client.py
index 4b9b2864..d7ab77a0 100644
--- a/service/test/support/integration/multi_user_client.py
+++ b/service/test/support/integration/multi_user_client.py
@@ -19,7 +19,7 @@ from mockito import mock, when, any as ANY
from pixelated.authentication import Authenticator, Authentication
from twisted.internet import defer
-from pixelated.application import UserAgentMode, set_up_protected_resources
+from pixelated.application import UserAgentMode, set_up_protected_resources, get_static_folder, get_templates_folder
from pixelated.config.services import ServicesFactory
from pixelated.config.sessions import LeapSessionFactory
@@ -46,7 +46,7 @@ class MultiUserClient(AppTestClient):
self.service_factory = ServicesFactory(UserAgentMode(is_single_user=False))
- root_resource = RootResource(self.service_factory)
+ root_resource = RootResource(self.service_factory, get_templates_folder(), get_static_folder())
leap_provider = mock()
self.credentials_checker = StubSRPChecker(leap_provider)
self.resource = set_up_protected_resources(root_resource, leap_provider, self.service_factory)