Fix formatting and some typos

This commit is contained in:
tomdds
2020-01-14 15:21:02 -05:00
parent 34546ecd94
commit d81d953c31
14 changed files with 189 additions and 141 deletions

View File

@@ -13,26 +13,24 @@ def portfolio():
portfolio = PortfolioFactory.create()
return portfolio
def test_fsm_creation(portfolio):
sm = PortfolioStateMachineFactory.create(portfolio=portfolio)
assert sm.portfolio
def test_fsm_transition_start(portfolio):
sm = PortfolioStateMachineFactory.create(portfolio=portfolio)
assert sm.portfolio
assert sm.state == FSMStates.UNSTARTED
# next_state does not create the trigger callbacks !!!
#sm.next_state()
# sm.next_state()
sm.init()
assert sm.state == FSMStates.STARTING
sm.start()
assert sm.state == FSMStates.STARTED
#import ipdb;ipdb.set_trace()
sm.create_tenant(a=1, b=2)
assert sm.state == FSMStates.TENANT_CREATED