def testApprovalValidation(self): # String instead of list of users with self.assertRaises( client_approval_auth.ErrorInvalidClientApprovalAuthorization): client_approval_auth.ClientApprovalAuthorization( label="label", users="test") # Missing label acl = client_approval_auth.ClientApprovalAuthorization(users=["test"]) with self.assertRaises( client_approval_auth.ErrorInvalidClientApprovalAuthorization): print(acl.label) # Bad label with self.assertRaises( client_approval_auth.ErrorInvalidClientApprovalAuthorization): acl.label = None
def GenerateSample(self, number=0): return client_approval_auth.ClientApprovalAuthorization( label="label%d" % number, users=["test", "test2"])