当前位置: 首页>>代码示例>>Python>>正文


Python test_common.add_user_global_group函数代码示例

本文整理汇总了Python中test_common.add_user_global_group函数的典型用法代码示例。如果您正苦于以下问题:Python add_user_global_group函数的具体用法?Python add_user_global_group怎么用?Python add_user_global_group使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了add_user_global_group函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_delete_user_global_group_xml

 def test_delete_user_global_group_xml(self):
     resp, content = utils.create_global_group(self.global_group, str(self.auth_token))
     utils.create_user(self.tenant, self.user, str(self.auth_token))
     utils.add_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))
     if int(resp["status"]) == 500:
         self.fail("IDM fault")
     elif int(resp["status"]) == 503:
         self.fail("Service Not Available")
     self.assertEqual(204, int(resp_new["status"]))
开发者ID:juvvadi,项目名称:keystone,代码行数:10,代码来源:test_groups.py

示例2: test_get_users_global_group_forbidden

    def test_get_users_global_group_forbidden(self):
        resp, content = utils.create_global_group(self.global_group, str(self.auth_token))
        utils.create_user(self.tenant, self.user, str(self.auth_token))
        utils.add_user_global_group(self.global_group, self.user, str(self.auth_token))
        resp_new, content_new = utils.get_user_global_group(self.global_group, str(self.disabled_token))

        if int(resp["status"]) == 500:
            self.fail("IDM fault")
        elif int(resp["status"]) == 503:
            self.fail("Service Not Available")
        self.assertEqual(403, int(resp_new["status"]))
开发者ID:juvvadi,项目名称:keystone,代码行数:11,代码来源:test_groups.py

示例3: test_add_user_global_group_conflict

    def test_add_user_global_group_conflict(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.auth_token))
        respG, contentG = utils.add_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(409, int(respG["status"]))
开发者ID:roarking,项目名称:keystone,代码行数:12,代码来源:test_groups.py

示例4: test_get_users_global_group_expired_xml

 def test_get_users_global_group_expired_xml(self):
     resp, _content = utils.create_global_group(self.global_group,
                                           str(self.auth_token))
     utils.create_user(self.tenant, self.user, str(self.auth_token))
     utils.add_user_global_group(self.global_group, self.user,
                                 str(self.auth_token))
     resp_new, _content_new = utils.get_user_global_group_xml(\
                                             self.global_group,
                                             str(self.exp_auth_token))
     if int(resp['status']) == 500:
         self.fail('Identity Fault')
     elif int(resp['status']) == 503:
         self.fail('Service Not Available')
     self.assertEqual(403, int(resp_new['status']))
开发者ID:mgius,项目名称:keystone,代码行数:14,代码来源:test_groups.py

示例5: test_add_user_global_group_conflict

    def test_add_user_global_group_conflict(self):
        resp, content = utils.create_global_group(self.global_group,
                                              str(self.auth_token))
        utils.create_user(self.tenant, self.user, str(self.auth_token))
        utils.add_user_global_group(self.global_group, self.user,
                                    str(self.auth_token))
        resp_new, content_new = utils.add_user_global_group(self.global_group,
                                                self.user,
                                                str(self.auth_token))

        if int(resp['status']) == 500:
            self.fail('Identity Fault')
        elif int(resp['status']) == 503:
            self.fail('Service Not Available')
        self.assertEqual(409, int(resp_new['status']))
开发者ID:slashk,项目名称:keystone,代码行数:15,代码来源:test_groups.py

示例6: test_delete_user_global_group_notfound_xml

 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']))
开发者ID:mgius,项目名称:keystone,代码行数:16,代码来源:test_groups.py

示例7: test_add_user_global_group

    def test_add_user_global_group(self):
        resp, content = utils.create_global_group(self.global_group, str(self.auth_token))
        utils.create_user(self.tenant, self.user, str(self.auth_token))
        resp_new, content_new = utils.add_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")
        if int(resp_new["status"]) not in (200, 201):
            self.fail("Failed due to %d" % int(resp_new["status"]))
开发者ID:juvvadi,项目名称:keystone,代码行数:11,代码来源:test_groups.py

示例8: test_add_user_global_group

    def test_add_user_global_group(self):
        resp, _content = utils.create_global_group(self.global_group,
                                              str(self.auth_token))
        utils.create_user(self.tenant, self.user, str(self.auth_token))
        resp_new, _content_new = utils.add_user_global_group(self.global_group,
                                                self.user,
                                                str(self.auth_token))

        if int(resp['status']) == 500:
            self.fail('Identity Fault')
        elif int(resp['status']) == 503:
            self.fail('Service Not Available')
        if int(resp_new['status']) not in (200, 201):
            self.fail('Failed due to %d' % int(resp_new['status']))
开发者ID:mgius,项目名称:keystone,代码行数:14,代码来源:test_groups.py


注:本文中的test_common.add_user_global_group函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。