示例#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())