本文整理汇总了Python中MilkCheck.Engine.Action.Action.stop_time方法的典型用法代码示例。如果您正苦于以下问题:Python Action.stop_time方法的具体用法?Python Action.stop_time怎么用?Python Action.stop_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MilkCheck.Engine.Action.Action
的用法示例。
在下文中一共展示了Action.stop_time方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_reset_action
# 需要导入模块: from MilkCheck.Engine.Action import Action [as 别名]
# 或者: from MilkCheck.Engine.Action.Action import stop_time [as 别名]
def test_reset_action(self):
"""Test resest values of an action"""
action = Action(name="start", target="fortoy5", command="/bin/true", timeout=10, delay=5)
action.maxretry = 5
action.tries = 4
action.worker = "test"
action.start_time = "00:20:30"
action.stop_time = "00:20:30"
action.reset()
self.assertEqual(action.tries, 0)
self.assertEqual(action.worker, None)
self.assertEqual(action.start_time, None)
self.assertEqual(action.stop_time, None)
self.assertEqual(action.status, NO_STATUS)
示例2: test_reset_action
# 需要导入模块: from MilkCheck.Engine.Action import Action [as 别名]
# 或者: from MilkCheck.Engine.Action.Action import stop_time [as 别名]
def test_reset_action(self):
'''Test resest values of an action'''
action = Action(name='start', target='fortoy5', command='/bin/true',
timeout=10, delay=5)
action.maxretry = 5
action.tries = 4
action.worker = 'test'
action.start_time = 1444253681.36017
action.stop_time = 1444253681.36017
action.reset()
self.assertEqual(action.tries, 0)
self.assertEqual(action.worker, None)
self.assertEqual(action.start_time, None)
self.assertEqual(action.stop_time, None)
self.assertEqual(action.status, NO_STATUS)