예제 #1
0
    def test_get_state_from_lastBuildStatus_success(self):

        self.assertEqual(gocd.build_state_factory(last_build_status='Success'),
                         gocd.BuildStateSuccess())
예제 #2
0
    def test_get_state_from_lastBuildStatus_failure(self):

        self.assertEqual(gocd.build_state_factory(last_build_status='Failure'),
                         gocd.BuildStateFailure())
예제 #3
0
    def test_get_state_from_event_cancelled(self):

        self.assertEqual(gocd.build_state_factory(event=gocd.Event.CANCELLED),
                         gocd.BuildStateUnknown())
예제 #4
0
    def test_get_state_from_event_breaks(self):

        self.assertEqual(gocd.build_state_factory(event=gocd.Event.BREAKS),
                         gocd.BuildStateFailure())
예제 #5
0
    def test_get_state_from_event_fails(self):

        self.assertEqual(gocd.build_state_factory(event=gocd.Event.FAILS),
                         gocd.BuildStateFailure())
예제 #6
0
    def test_get_state_from_event_fixed(self):

        self.assertEqual(gocd.build_state_factory(event=gocd.Event.FIXED),
                         gocd.BuildStateSuccess())
예제 #7
0
    def test_get_state_from_event_pass(self):

        self.assertEqual(gocd.build_state_factory(event=gocd.Event.PASSES),
                         gocd.BuildStateSuccess())