本文整理汇总了Python中pyjen.jenkins.Jenkins.cancel_shutdown方法的典型用法代码示例。如果您正苦于以下问题:Python Jenkins.cancel_shutdown方法的具体用法?Python Jenkins.cancel_shutdown怎么用?Python Jenkins.cancel_shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjen.jenkins.Jenkins
的用法示例。
在下文中一共展示了Jenkins.cancel_shutdown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_prepare_shutdown
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import cancel_shutdown [as 别名]
def test_prepare_shutdown(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
try:
jk.prepare_shutdown()
assert jk.is_shutting_down
finally:
jk.cancel_shutdown()
示例2: test_cancel_shutdown
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import cancel_shutdown [as 别名]
def test_cancel_shutdown(self):
mock_data_io = MagicMock()
j = Jenkins(mock_data_io)
j.cancel_shutdown()
self.assertEqual("call('/cancelQuietDown')", str(mock_data_io.post.call_args))
self.assertEqual(mock_data_io.post.call_count, 1, "post method should have only been called once")
示例3: test_cancel_shutdown_not_quietdown_mode
# 需要导入模块: from pyjen.jenkins import Jenkins [as 别名]
# 或者: from pyjen.jenkins.Jenkins import cancel_shutdown [as 别名]
def test_cancel_shutdown_not_quietdown_mode(jenkins_env):
jk = Jenkins(jenkins_env["url"], (jenkins_env["admin_user"], jenkins_env["admin_token"]))
assert not jk.is_shutting_down
jk.cancel_shutdown()
assert not jk.is_shutting_down