def setUp(self): self.authz = AuthorizationPolicy() self.authz.get_bound_permissions = mock.sentinel.get_bound_perms self.request = DummyRequest(method='GET') self.context = RouteFactory(self.request) self.context.on_collection = True self.context.check_permission = mock.Mock(return_value=False)
def setUp(self): self.authz = AuthorizationPolicy() self.authz.get_bound_permissions = mock.sentinel.get_bound_perms self.context = mock.MagicMock() self.context.get_prefixed_userid.return_value = None self.context.allowed_principals = [] self.context.object_id = mock.sentinel.object_id self.context.required_permission = 'read' self.principals = [] self.permission = 'dynamic'