def test_works_if_userid_is_not_in_principals(self): request = DummyRequest() request.effective_principals = ["basic:foo", "system.Authenticated"] request.prefixed_userid = "basic:foo" self.assertEqual(prefixed_principals(request), ["basic:foo", "system.Authenticated"])
def test_removes_unprefixed_from_principals(self): request = DummyRequest() request.effective_principals = ["foo", "system.Authenticated"] request.prefixed_userid = "basic:foo" self.assertEqual(prefixed_principals(request), ["basic:foo", "system.Authenticated"])
def test_removes_unprefixed_from_principals(self): request = DummyRequest() request.effective_principals = ['foo', 'system.Authenticated'] request.prefixed_userid = 'basic:foo' self.assertEqual(prefixed_principals(request), ['basic:foo', 'system.Authenticated'])
def test_works_if_userid_is_not_in_principals(self): request = DummyRequest() request.effective_principals = ['basic:foo', 'system.Authenticated'] request.prefixed_userid = 'basic:foo' self.assertEqual(prefixed_principals(request), ['basic:foo', 'system.Authenticated'])