diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-25 15:50:50 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-25 15:50:50 +0100 |
commit | e313d7c8880192ab3261cdd8cb263f5eef28d40a (patch) | |
tree | 0b719413a3e5e0433cccdf88ba449d49ddc9c736 /service | |
parent | 7802cf70c3b2ec3c14fd735dc211b00914c731cb (diff) |
make credentialsFactories parameter to auth session wrapper optional
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/application.py | 2 | ||||
-rw-r--r-- | service/pixelated/resources/auth.py | 2 | ||||
-rw-r--r-- | service/test/unit/resources/test_auth.py | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/service/pixelated/application.py b/service/pixelated/application.py index 46e5ba85..fa6568e6 100644 --- a/service/pixelated/application.py +++ b/service/pixelated/application.py @@ -159,7 +159,7 @@ def set_up_protected_resources(root_resource, provider, services_factory, banner _portal = portal.Portal(realm, [session_checker, AllowAnonymousAccess()]) anonymous_resource = LoginResource(services_factory, provider, disclaimer_banner=banner, authenticator=authenticator) - protected_resource = PixelatedAuthSessionWrapper(_portal, root_resource, anonymous_resource, []) + protected_resource = PixelatedAuthSessionWrapper(_portal, root_resource, anonymous_resource) root_resource.initialize(provider, disclaimer_banner=banner, authenticator=authenticator) return protected_resource diff --git a/service/pixelated/resources/auth.py b/service/pixelated/resources/auth.py index ef5c9710..833c0f9d 100644 --- a/service/pixelated/resources/auth.py +++ b/service/pixelated/resources/auth.py @@ -75,7 +75,7 @@ class PixelatedAuthSessionWrapper(object): isLeaf = False - def __init__(self, portal, root_resource, anonymous_resource, credentialFactories): + def __init__(self, portal, root_resource, anonymous_resource, credentialFactories=[]): self._portal = portal self._credentialFactories = credentialFactories self._root_resource = root_resource diff --git a/service/test/unit/resources/test_auth.py b/service/test/unit/resources/test_auth.py index 80f1ebb0..10650e53 100644 --- a/service/test/unit/resources/test_auth.py +++ b/service/test/unit/resources/test_auth.py @@ -20,9 +20,8 @@ class TestPixelatedAuthSessionWrapper(unittest.TestCase): self.user_uuid_mock = mock() self.root_resource_mock = mock() self.anonymous_resource_mock = mock() - credential_factories_mock = mock() - self.session_wrapper = PixelatedAuthSessionWrapper(self.portal_mock, self.root_resource_mock, self.anonymous_resource_mock, credential_factories_mock) + self.session_wrapper = PixelatedAuthSessionWrapper(self.portal_mock, self.root_resource_mock, self.anonymous_resource_mock) self.request = DummyRequest([]) self.request.prepath = [''] self.request.path = '/' |