本文整理汇总了Python中testing.disable_logging函数的典型用法代码示例。如果您正苦于以下问题:Python disable_logging函数的具体用法?Python disable_logging怎么用?Python disable_logging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了disable_logging函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_stop
def test_stop(self):
testing.disable_logging()
flexmock(subprocess)\
.should_receive('call')\
.and_return(0)
self.assertEqual(True, monit_interface.stop("watch_name"))
flexmock(subprocess)\
.should_receive('call')\
.and_return(1)
self.assertEqual(False, monit_interface.stop("watch_name"))
开发者ID:UCSB-CS-RACELab,项目名称:eager-appscale,代码行数:12,代码来源:test_monit_interface.py
示例2: test_wait_on_app
def test_wait_on_app(self):
port = 20000
ip = '127.0.0.1'
testing.disable_logging()
fake_opener = flexmock(
open=lambda opener: flexmock(code=200, headers=flexmock(headers=[])))
flexmock(urllib2).should_receive('build_opener').and_return(fake_opener)
flexmock(appscale_info).should_receive('get_private_ip').and_return(ip)
self.assertEqual(True, app_manager_server.wait_on_app(port))
flexmock(time).should_receive('sleep').and_return()
fake_opener.should_receive('open').and_raise(IOError)
self.assertEqual(False, app_manager_server.wait_on_app(port))
开发者ID:airamrguez,项目名称:appscale,代码行数:13,代码来源:test_app_manager_server.py
示例3: test_start
def test_start(self):
testing.disable_logging()
flexmock(file_io)\
.should_receive('delete')\
.and_return()
flexmock(subprocess)\
.should_receive('call')\
.and_return(0)
self.assertEqual(True, god_interface.start("fakeconfig.conf", "watch_name"))
flexmock(subprocess)\
.should_receive('call')\
.and_return(1)
self.assertEqual(False, god_interface.start("fakeconfig.conf", "watch_name"))
开发者ID:GavinHwa,项目名称:appscale,代码行数:18,代码来源:test_god_interface.py
示例4: test_start_app_badconfig2
def test_start_app_badconfig2(self):
testing.disable_logging()
self.assertEqual(app_manager_server.BAD_PID, app_manager_server.start_app("{'app_name':'test'}"))
开发者ID:YongMan,项目名称:appscale,代码行数:3,代码来源:test_app_manager_server.py
示例5: test_start_app_badconfig
def test_start_app_badconfig(self):
testing.disable_logging()
self.assertEqual(app_manager_server.BAD_PID, app_manager_server.start_app({}))
开发者ID:YongMan,项目名称:appscale,代码行数:3,代码来源:test_app_manager_server.py
示例6: test_bad_convert_config_from_json
def test_bad_convert_config_from_json(self):
testing.disable_logging()
self.assertEqual(None, app_manager_server.convert_config_from_json(None))
self.assertEqual(None, app_manager_server.convert_config_from_json("{}"))
self.assertEqual(None, app_manager_server.convert_config_from_json("{'app_name':'test'}"))
开发者ID:YongMan,项目名称:appscale,代码行数:5,代码来源:test_app_manager_server.py
注:本文中的testing.disable_logging函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论