示例#1
0
    def testACLValidation(self):
        api_auth_manager.APIAuthorization(
            router="DummyAuthManagerTestApiRouter",
            users=["u1", "u2"],
            groups=["g1", "g2"])

        api_auth_manager.APIAuthorization(
            router="DummyAuthManagerTestApiRouter")
示例#2
0
 def GenerateSample(self, number=0):
     return api_auth_manager.APIAuthorization(
         router="DummyAuthManagerTestApiRouter", users=["user%s" % number])
示例#3
0
 def testACLValidationBadGroups(self):
     with self.assertRaises(api_auth_manager.InvalidAPIAuthorization):
         api_auth_manager.APIAuthorization(
             router="DummyAuthManagerTestApiHandler",
             users=["u1"],
             groups="g1")
 def testACLValidationBadGroups(self):
     with self.assertRaises(api_auth_manager.InvalidAPIAuthorization):
         api_auth_manager.APIAuthorization(handler="ApiCallHandler",
                                           users=["u1"],
                                           groups="g1")
    def testACLValidation(self):
        api_auth_manager.APIAuthorization(handler="ApiCallHandler",
                                          users=["u1", "u2"],
                                          groups=["g1", "g2"])

        api_auth_manager.APIAuthorization(handler="ApiCallHandler")
 def GenerateSample(self, number=0):
     return api_auth_manager.APIAuthorization(handler="ApiCallHandler",
                                              users=["user%s" % number])
示例#7
0
 def testACLValidationBadUsers(self):
     with self.assertRaises(api_auth_manager.InvalidAPIAuthorization):
         api_auth_manager.APIAuthorization(renderer="ApiCallRenderer",
                                           users="u1",
                                           groups=["g1"])