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


Python keystoneauth.filter_factory函数代码示例

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


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

示例1: test_override_asked_for_and_allowed

 def test_override_asked_for_and_allowed(self):
     conf = {'allow_overrides': 'true'}
     self.test_auth = keystoneauth.filter_factory(conf)(FakeApp())
     req = self._make_request('/v1/AUTH_account',
                              environ={'swift.authorize_override': True})
     resp = req.get_response(self.test_auth)
     self.assertEquals(resp.status_int, 404)
开发者ID:HoO-Group,项目名称:swift,代码行数:7,代码来源:test_keystoneauth.py

示例2: _get_successful_middleware

 def _get_successful_middleware(self):
     response_iter = iter([('200 OK', {}, '')])
     return keystoneauth.filter_factory({})(FakeApp(response_iter))
开发者ID:HoO-Group,项目名称:swift,代码行数:3,代码来源:test_keystoneauth.py

示例3: setUp

 def setUp(self):
     self.test_auth = keystoneauth.filter_factory({})(FakeApp())
     self.test_auth.logger = FakeLogger()
开发者ID:HoO-Group,项目名称:swift,代码行数:3,代码来源:test_keystoneauth.py

示例4: test_reseller_prefix_not_added_double_underscores

 def test_reseller_prefix_not_added_double_underscores(self):
     conf = {'reseller_prefix': 'AUTH_'}
     test_auth = keystoneauth.filter_factory(conf)(FakeApp())
     self.assertEqual(test_auth.reseller_prefix, "AUTH_")
开发者ID:HoO-Group,项目名称:swift,代码行数:4,代码来源:test_keystoneauth.py

示例5: test_blank_reseller_prefix

 def test_blank_reseller_prefix(self):
     conf = {'reseller_prefix': ''}
     test_auth = keystoneauth.filter_factory(conf)(FakeApp())
     account = tenant_id = 'foo'
     self.assertTrue(test_auth._reseller_check(account, tenant_id))
开发者ID:HoO-Group,项目名称:swift,代码行数:5,代码来源:test_keystoneauth.py

示例6: test_override_asked_for_but_not_allowed

 def test_override_asked_for_but_not_allowed(self):
     conf = {"allow_overrides": "false"}
     self.test_auth = keystoneauth.filter_factory(conf)(FakeApp())
     req = self._make_request("/v1/AUTH_account", environ={"swift.authorize_override": True})
     resp = req.get_response(self.test_auth)
     self.assertEquals(resp.status_int, 401)
开发者ID:Mirantis,项目名称:swift-encrypt,代码行数:6,代码来源:test_keystoneauth.py

示例7: test_reseller_prefix_added_underscore

 def test_reseller_prefix_added_underscore(self):
     conf = {"reseller_prefix": "AUTH"}
     test_auth = keystoneauth.filter_factory(conf)(FakeApp())
     self.assertEqual(test_auth.reseller_prefix, "AUTH_")
开发者ID:kalrey,项目名称:swift,代码行数:4,代码来源:test_keystoneauth.py


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