~abompard/mailman/subpolicy

« back to all changes in this revision

Viewing changes to src/mailman/app/tests/test_workflow.py

  • Committer: Barry Warsaw
  • Date: 2015-04-07 02:12:37 UTC
  • Revision ID: barry@list.org-20150407021237-teu8vyk6vhjr1vzo
Check pointing

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
class MyWorkflow(Workflow):
32
32
    INITIAL_STATE = 'first'
33
33
    SAVE_ATTRIBUTES = ('ant', 'bee', 'cat')
34
 
    SAVE_KEY = 'test-workflow'
35
34
 
36
35
    def __init__(self):
37
36
        super().__init__()
 
37
        self.token = 'test-workflow'
38
38
        self.ant = 1
39
39
        self.bee = 2
40
40
        self.cat = 3
116
116
        self.assertEqual(new_workflow.bee, 8)
117
117
        self.assertEqual(new_workflow.cat, 7)
118
118
        self.assertEqual(new_workflow.dog, 4)
 
119
 
 
120
    def test_run_thru(self):
 
121
        # Run all steps through the given one.
 
122
        results = self._workflow.run_thru(second)
 
123
        self.assertEqual(results, ['one', 'two'])
 
124
 
 
125
    def test_run_until(self):
 
126
        # Run until (but not including