Esempio n. 1
0
 def test_checkUnauthenticated(self):
     # DelegatedAuthorization.checkUnauthenticated() punts the checks back
     # up to the security policy by generating (object, permission) tuples.
     # The security policy is in a much better position to, well, apply
     # policy.
     obj, delegated_obj = object(), object()
     authorization = DelegatedAuthorization(obj, delegated_obj,
                                            "dedicatemyselfto.Evil")
     self.assertEqual([(delegated_obj, "dedicatemyselfto.Evil")],
                      list(authorization.checkUnauthenticated()))
 def test_checkUnauthenticated(self):
     # DelegatedAuthorization.checkUnauthenticated() punts the checks back
     # up to the security policy by generating (object, permission) tuples.
     # The security policy is in a much better position to, well, apply
     # policy.
     obj, delegated_obj = object(), object()
     authorization = DelegatedAuthorization(
         obj, delegated_obj, "dedicatemyselfto.Evil")
     self.assertEqual(
         [(delegated_obj, "dedicatemyselfto.Evil")],
         list(authorization.checkUnauthenticated()))