本文整理汇总了Python中stackinabox.stack.StackInABox.reset_services方法的典型用法代码示例。如果您正苦于以下问题:Python StackInABox.reset_services方法的具体用法?Python StackInABox.reset_services怎么用?Python StackInABox.reset_services使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stackinabox.stack.StackInABox
的用法示例。
在下文中一共展示了StackInABox.reset_services方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def run():
StackInABox.reset_services()
StackInABox.register_service(HelloService())
stackinabox.util.responses.registration('localhost')
res = requests.get('http://localhost/hello/')
assert res.status_code == 200
assert res.text == 'Hello'
示例2: run
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def run():
responses.mock.start()
StackInABox.reset_services()
for service in self.services.values():
StackInABox.register_service(service)
responses_registration(self.uri)
return_value = fn(*args_finalized, **kwargs)
StackInABox.reset_services()
responses.mock.stop()
responses.mock.reset()
示例3: wrapped
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def wrapped(*args, **kwargs):
args_copy = list(args)
for arg in self.args:
args_copy.append(arg)
args_finalized = tuple(args_copy)
kwargs.update(self.kwargs)
if self.enable_service_access is not None:
kwargs[self.enable_service_access] = self.services
with requests_mock_activate():
if self.session is not None:
kwargs[self.session] = requests.Session()
StackInABox.reset_services()
for service in self.services.values():
StackInABox.register_service(service)
requests_mock_session_registration(
self.uri,
kwargs[self.session]
)
return_value = fn(*args_finalized, **kwargs)
StackInABox.reset_services()
else:
StackInABox.reset_services()
for service in self.services.values():
StackInABox.register_service(service)
requests_mock_registration(self.uri)
return_value = fn(*args_finalized, **kwargs)
StackInABox.reset_services()
return return_value
示例4: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestKeystoneV2UserListing, self).tearDown()
StackInABox.reset_services()
示例5: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestKeystoneV2UserAddCredentials, self).tearDown()
StackInABox.reset_services()
示例6: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestKeystoneV2AuthBase, self).tearDown()
StackInABox.reset_services()
示例7: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestHttprettyKeystone, self).tearDown()
StackInABox.reset_services()
self.session.close()
示例8: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestMetrics, self).tearDown()
StackInABox.reset_services()
示例9: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestRequestMockAdvanced, self).tearDown()
StackInABox.reset_services()
self.session.close()
示例10: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestServiceRouteRegistration, self).tearDown()
StackInABox.reset_services()
示例11: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestKeystoneV2Tenants, self).tearDown()
StackInABox.reset_services()
示例12: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
super(TestHttprettyAdvanced, self).tearDown()
StackInABox.reset_services()
示例13: tearDown
# 需要导入模块: from stackinabox.stack import StackInABox [as 别名]
# 或者: from stackinabox.stack.StackInABox import reset_services [as 别名]
def tearDown(self):
"""
Test Teardown
"""
StackInABox.reset_services()