本文整理汇总了Python中recore.fsm.FSM.completed_steps方法的典型用法代码示例。如果您正苦于以下问题:Python FSM.completed_steps方法的具体用法?Python FSM.completed_steps怎么用?Python FSM.completed_steps使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类recore.fsm.FSM
的用法示例。
在下文中一共展示了FSM.completed_steps方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_move_active_to_completed
# 需要导入模块: from recore.fsm import FSM [as 别名]
# 或者: from recore.fsm.FSM import completed_steps [as 别名]
def test_move_active_to_completed(self):
"""FSM can update after completing a step"""
f = FSM(state_id)
f.active_step = _active_step_string
f.active_sequence = new_active_sequence()
f.active_sequence['completed_steps'] = []
f.executed = []
f.execution = new_playbook()['execution']
f.completed_steps = []
# For .called_once_with()
_update_state = {
'$set': {
'active_step': None,
'active_sequence': f.active_sequence
}
}
with mock.patch.object(f, 'update_state') as (us):
f.move_active_to_completed()
us.assert_called_once_with(_update_state)