Beispiel #1
0
    def test_forget(self):
        from pyramid.security import LegacySecurityPolicy

        request = _makeRequest()
        policy = LegacySecurityPolicy()
        _registerAuthenticationPolicy(request.registry, None)

        self.assertEqual(policy.forget(request),
                         [('X-Pyramid-Test', 'logout')])
Beispiel #2
0
    def test_forget_with_kwargs(self):
        from pyramid.security import LegacySecurityPolicy

        policy = LegacySecurityPolicy()
        self.assertRaises(ValueError, lambda: policy.forget(None, foo='bar'))