Skip to content

Commit

Permalink
Fixes order changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gvangool committed Oct 2, 2015
1 parent 7726508 commit c977097
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion django_states/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,16 @@ class not_runing(StateGroup):
# Admin actions
actions = T3Machine.get_admin_actions()
self.assertEqual(len(actions), 2)
action = actions[0]
action = filter(lambda a: a.__name__ == 'state_transition_startup', actions)[0]
self.assertEqual(action.__name__, 'state_transition_startup')
self.assertTrue('stopped' in action.short_description)
self.assertTrue('running' in action.short_description)
self.assertTrue('Start up the machine!' in action.short_description)
action = filter(lambda a: a.__name__ == 'state_transition_crash', actions)[0]
self.assertEqual(action.__name__, 'state_transition_crash')
self.assertTrue('crashed' in action.short_description)
self.assertTrue('running' in action.short_description)
self.assertTrue('Crash the machine!' in action.short_description)


class StateFieldTestCase(TransactionTestCase):
Expand Down

0 comments on commit c977097

Please sign in to comment.