Code Duplication    Length = 13-13 lines in 2 locations

tests/state_machine_test.py 2 locations

@@ 72-84 (lines=13) @@
69
        self.assertTrue(self.statemachine.state.is_in_state('failed'))
70
        self.assertEquals([], results)
71
72
    def test_workflow_first_completed(self):
73
        results = self.statemachine.eval(self.events[:13])
74
        self.assertTrue(self.statemachine.state.is_in_state('running'))
75
        self.assertEquals(
76
            [
77
                (result.name, result.activity, result.activity_input)
78
                 for result in results
79
            ],
80
            [
81
                (
82
                    'saying_hi_again',
83
                    self.plan.activities['HelloWorld'],
84
                    {'who': 'world'}
85
                )
86
            ]
87
        )
@@ 41-53 (lines=13) @@
38
        # Create a state machine
39
        self.statemachine = pydecider.state_machine.StateMachine(self.plan)
40
41
    def test_workflow_start(self):
42
        results = self.statemachine.eval(self.events[:3])
43
        self.assertTrue(self.statemachine.state.is_in_state('running'))
44
        self.assertEquals(
45
            [
46
                (result.name, result.activity, result.activity_input)
47
                 for result in results
48
            ],
49
            [
50
                (
51
                    'saying_hi',
52
                    self.plan.activities['HelloWorld'],
53
                    {'who': 'world'}
54
                )
55
            ]
56
        )