summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-11-25 15:53:53 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-11-25 15:53:53 +0100
commitb97e47d564cc4bbd6b0f0ac2cccc0fa46490c764 (patch)
tree03dcc8baa2a7fad4df5376a6965872d399d4392b
parent8dbd0210911475ec48d23e741de192a09e23f101 (diff)
don't mock the root resource in auth wrapper test
-rw-r--r--service/test/unit/resources/test_auth.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/service/test/unit/resources/test_auth.py b/service/test/unit/resources/test_auth.py
index 05d07130..2b85a3cf 100644
--- a/service/test/unit/resources/test_auth.py
+++ b/service/test/unit/resources/test_auth.py
@@ -18,10 +18,11 @@ class TestPixelatedAuthSessionWrapper(unittest.TestCase):
def setUp(self):
self.portal_mock = mock()
self.user_uuid_mock = mock()
- self.root_resource_mock = mock()
+ services_factory = mock()
+ self.root_resource = RootResource(services_factory)
self.anonymous_resource_mock = mock()
- self.session_wrapper = PixelatedAuthSessionWrapper(self.portal_mock, self.root_resource_mock, self.anonymous_resource_mock)
+ self.session_wrapper = PixelatedAuthSessionWrapper(self.portal_mock, self.root_resource, self.anonymous_resource_mock)
self.request = DummyRequest([])
self.request.prepath = ['']
self.request.path = '/'
@@ -45,7 +46,7 @@ class TestPixelatedAuthSessionWrapper(unittest.TestCase):
d = deferred_resource.d
def assert_root_resource(resource):
- self.assertIs(resource, self.root_resource_mock)
+ self.assertIs(resource, self.root_resource)
d.addCallback(assert_root_resource)
return d