def test_master_init(self):
     m = statemachine.Master(force_bootstrap=False)
     assert m.context
     assert not m.context.authorized
     assert isinstance(m.unauthorized_machine,
                       statemachine.UnauthorizedStateMachine)
     assert isinstance(m.authorized_machine,
                       statemachine.AuthorizedStateMachine)
示例#2
0
 def test_master(self, ctx):
     master = statemachine.Master(force_bootstrap=False)
     # Do not run the infinite loop
     master.quit = True
     master.run(ctx)