def setUp(self): super(ApprovalByLabelE2ETest, self).setUp() self.SetUpLegacy() if data_store.RelationalDBReadEnabled(): self.SetUpRelationalDB() cls = (api_call_router_with_approval_checks.ApiCallRouterWithApprovalChecks) cls.ClearCache() self.approver = test_lib.ConfigOverrider({ "API.DefaultRouter": cls.__name__, "ACL.approvers_config_file": os.path.join(self.base_path, "approvers.yaml") }) self.approver.Start() # Get a fresh approval manager object and reload with test approvers. self.approval_manager_stubber = utils.Stubber( client_approval_auth, "CLIENT_APPROVAL_AUTH_MGR", client_approval_auth.ClientApprovalAuthorizationManager()) self.approval_manager_stubber.Start() # Force creation of new APIAuthorizationManager, so that configuration # changes are picked up. api_auth_manager.APIACLInit.InitApiAuthManager()
def setUp(self): super(ClientApprovalAuthorizationManager, self).setUp() self.mgr = client_approval_auth.ClientApprovalAuthorizationManager() self.urn = rdf_client.ClientURN("C.0000000000000000")