Exemple #1
0
    def test_tenant_create(self):
        utils.delete_user(self.tenant, self.user, self.auth_token)
        utils.delete_tenant(self.tenant, str(self.auth_token))
        resp, content = utils.create_tenant(self.tenant, str(self.auth_token))
        if int(resp['status']) == 500:
            self.fail('IDM fault')
        elif int(resp['status']) == 503:
            self.fail('Service Not Available')

        if int(resp['status']) not in (200, 201):

            self.fail('Failed due to %d' % int(resp['status']))
Exemple #2
0
 def test_delete_global_group(self):
     utils.create_tenant(self.globaltenant, str(self.auth_token))
     utils.create_tenant_group('test_global_group_delete',
                               self.globaltenant, str(self.auth_token))
     resp_new, _content_new = utils.delete_global_group(\
                               'test_global_group_delete',
                               str(self.auth_token))
     _resp = utils.delete_tenant(self.globaltenant, str(self.auth_token))
     self.assertEqual(204, int(resp_new['status']))
Exemple #3
0
 def test_delete_global_group(self):
     resp, content = utils.create_tenant(self.globaltenant, str(self.auth_token))
     respG, contentG = utils.create_tenant_group("test_global_group_delete", self.globaltenant, str(self.auth_token))
     respG, contentG = utils.delete_global_group("test_global_group_delete", str(self.auth_token))
     resp, content = utils.delete_tenant(self.globaltenant, str(self.auth_token))
     self.assertEqual(204, int(respG["status"]))
Exemple #4
0
 def tearDown(self):
     resp, content = utils.delete_global_group(self.global_group, self.auth_token)
     resp, content = utils.delete_tenant(self.globaltenant, self.auth_token)
 def tearDown(self):
     utils.delete_user('test_tenant1', 'test_user1', self.auth_token)
     utils.delete_user('test_tenant1', 'test_user2', self.auth_token)
     utils.delete_user('test_tenant2', 'test_user1', self.auth_token)
     utils.delete_tenant('test_tenant1', self.auth_token)
     utils.delete_tenant('test_tenant2', self.auth_token)
Exemple #6
0
 def tearDown(self):
     utils.delete_user(self.user, self.auth_token)
     utils.delete_tenant(self.tenant, self.auth_token)
     utils.delete_all_baseurls_ref(self.tenant, self.auth_token)
Exemple #7
0
 def tearDown(self):
     utils.delete_user(self.user, str(self.auth_token))
     utils.delete_global_group(self.global_group, self.auth_token)
     utils.delete_tenant(self.globaltenant, self.auth_token)
Exemple #8
0
 def tearDown(self):
     utils.delete_user(self.user, self.auth_token)
     utils.delete_tenant(self.tenant, self.auth_token)
     utils.delete_service(self.sample_service, str(self.auth_token))
Exemple #9
0
 def tearDown(self):
     utils.delete_user(self.user, self.auth_token)
     utils.delete_tenant(self.tenant, self.auth_token)
Exemple #10
0
 def test_delete_tenant(self):
     resp, content = utils.create_tenant("test_tenant_delete",
                                   str(self.auth_token))
     resp = utils.delete_tenant("test_tenant_delete",
                                   str(self.auth_token))
     self.assertEqual(204, int(resp['status']))
Exemple #11
0
 def test_delete_tenant_not_found(self):
     #resp,content=utils.create_tenant("test_tenant_delete",
     #                                str(self.auth_token))
     resp = utils.delete_tenant("test_tenant_delete111",
                                   str(self.auth_token))
     self.assertEqual(404, int(resp['status']))
Exemple #12
0
 def tearDown(self):
     resp, content = utils.delete_tenant(self.tenant, self.auth_token)
 def tearDown(self):
     utils.delete_user(self.user, self.auth_token)
     utils.delete_tenant(self.tenant, self.auth_token)
     utils.delete_endpoint_template(self.endpoint_template_id,
         self.auth_token)
     utils.delete_all_endpoint(self.tenant, self.auth_token)