Beispiel #1
0
    def tearDown(self):
        utils.delete_user_global_group(self.global_group, self.user,
                                       str(self.auth_token))

        utils.delete_user(self.user, str(self.auth_token))
        utils.delete_user(self.user, self.auth_token)
        utils.delete_global_group(self.global_group, self.auth_token)
Beispiel #2
0
 def test_delete_user_global_group_notfound_xml(self):
     resp, content = utils.create_global_group(self.global_group, str(self.auth_token))
     if int(resp["status"]) == 500:
         self.fail("IDM fault")
     elif int(resp["status"]) == 503:
         self.fail("Service Not Available")
     utils.create_user(self.tenant, self.user, str(self.auth_token))
     utils.add_user_global_group(self.global_group, self.user, str(self.disabled_token))
     utils.delete_user_global_group(self.global_group, self.user, str(self.auth_token))
     resp_new, content_new = utils.delete_user_global_group_xml(self.global_group, self.user, str(self.auth_token))
     self.assertEqual(404, int(resp_new["status"]))
Beispiel #3
0
 def test_delete_user_global_group_notfound(self):
     h = httplib2.Http(".cache")
     resp, content = utils.create_global_group(self.global_group, str(self.auth_token))
     respG, contentG = utils.create_user(self.tenant, self.user, str(self.auth_token))
     respG, contentG = utils.add_user_global_group(self.global_group, self.user, str(self.disabled_token))
     respG, contentG = utils.delete_user_global_group(self.global_group, self.user, str(self.auth_token))
     respG, contentG = utils.delete_user_global_group(self.global_group, self.user, str(self.auth_token))
     if int(resp["status"]) == 500:
         self.fail("IDM fault")
     elif int(resp["status"]) == 503:
         self.fail("Service Not Available")
     self.assertEqual(404, int(respG["status"]))
Beispiel #4
0
 def test_delete_user_global_group_notfound_xml(self):
     resp, _content = utils.create_global_group(self.global_group,
                                           str(self.auth_token))
     if int(resp['status']) == 500:
         self.fail('Identity Fault')
     elif int(resp['status']) == 503:
         self.fail('Service Not Available')
     utils.create_user(self.tenant, self.user, str(self.auth_token))
     utils.add_user_global_group(self.global_group, self.user,
                                 str(self.disabled_token))
     utils.delete_user_global_group(self.global_group, self.user,
                                    str(self.auth_token))
     resp_new, _content_new = utils.delete_user_global_group_xml(\
                                     self.global_group, self.user,
                                        str(self.auth_token))
     self.assertEqual(404, int(resp_new['status']))
Beispiel #5
0
    def tearDown(self):
        respG, contentG = utils.delete_user_global_group(self.global_group, self.user, str(self.auth_token))

        respG, contentG = utils.delete_user(self.tenant, self.user, str(self.auth_token))
        resp, content = utils.delete_global_group(self.global_group, self.auth_token)