diff options
author | Zara Gebru <zgebru@thoughtworks.com> | 2016-12-02 15:25:23 +0100 |
---|---|---|
committer | Zara Gebru <zgebru@thoughtworks.com> | 2016-12-02 15:25:23 +0100 |
commit | b14833fbb56bcd5bff0750c16fd9214009b955be (patch) | |
tree | a1ec621dd5f76d756ac59b72a763a34a2c189387 /service/test/unit | |
parent | 688a8b42e8ab7c6d4529b6dda66f40eead07ad02 (diff) |
[refactor] move app dir into public dir
Diffstat (limited to 'service/test/unit')
-rw-r--r-- | service/test/unit/resources/test_auth.py | 6 | ||||
-rw-r--r-- | service/test/unit/resources/test_root_resource.py | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/service/test/unit/resources/test_auth.py b/service/test/unit/resources/test_auth.py index f4012b1b..7112ed96 100644 --- a/service/test/unit/resources/test_auth.py +++ b/service/test/unit/resources/test_auth.py @@ -1,4 +1,6 @@ from mockito import mock, when, any as ANY + +from pixelated.application import get_templates_folder, get_static_folder from pixelated.resources.auth import SessionChecker, PixelatedRealm, PixelatedAuthSessionWrapper from pixelated.resources.login_resource import LoginResource from pixelated.resources.root_resource import RootResource @@ -40,8 +42,8 @@ class TestPixelatedAuthSessionWrapper(unittest.TestCase): session_checker = SessionChecker(services_factory) self.portal = Portal(self.realm_mock, [session_checker, AllowAnonymousAccess()]) self.user_uuid_mock = mock() - self.root_resource = RootResource(services_factory) - self.anonymous_resource = RootResource(services_factory, public=True) + self.root_resource = RootResource(services_factory, get_templates_folder(), get_static_folder()) + self.anonymous_resource = RootResource(services_factory, get_templates_folder(), get_static_folder(), public=True) self.session_wrapper = PixelatedAuthSessionWrapper(self.portal, self.root_resource, self.anonymous_resource) self.request = DummyRequest([]) diff --git a/service/test/unit/resources/test_root_resource.py b/service/test/unit/resources/test_root_resource.py index 9d738a83..e72efe59 100644 --- a/service/test/unit/resources/test_root_resource.py +++ b/service/test/unit/resources/test_root_resource.py @@ -5,7 +5,7 @@ from mock import MagicMock, patch from mockito import mock, when, any as ANY import pixelated -from pixelated.application import UserAgentMode +from pixelated.application import UserAgentMode, get_templates_folder, get_static_folder from pixelated.resources import IPixelatedSession, UnAuthorizedResource from pixelated.resources.features_resource import FeaturesResource from pixelated.resources.login_resource import LoginResource @@ -22,7 +22,7 @@ from pixelated.resources.root_resource import InboxResource, RootResource, MODE_ class TestPublicRootResource(unittest.TestCase): def setUp(self): - self.public_root_resource = RootResource(mock(), public=True) + self.public_root_resource = RootResource(mock(), get_templates_folder(), get_static_folder(), public=True) self.web = DummySite(self.public_root_resource) @patch('pixelated.resources.mails_resource.events.register') @@ -105,7 +105,7 @@ class TestRootResource(unittest.TestCase): when(self.services_factory).services(ANY()).thenReturn(self.services) self.mail_service.account_email = self.MAIL_ADDRESS - self.root_resource = RootResource(self.services_factory) + self.root_resource = RootResource(self.services_factory, get_templates_folder(), get_static_folder()) self.web = DummySite(self.root_resource) @patch('pixelated.resources.mails_resource.events.register') |