def test_get_state_from_lastBuildStatus_success(self): self.assertEqual(gocd.build_state_factory(last_build_status='Success'), gocd.BuildStateSuccess())
def test_get_state_from_lastBuildStatus_failure(self): self.assertEqual(gocd.build_state_factory(last_build_status='Failure'), gocd.BuildStateFailure())
def test_get_state_from_event_cancelled(self): self.assertEqual(gocd.build_state_factory(event=gocd.Event.CANCELLED), gocd.BuildStateUnknown())
def test_get_state_from_event_breaks(self): self.assertEqual(gocd.build_state_factory(event=gocd.Event.BREAKS), gocd.BuildStateFailure())
def test_get_state_from_event_fails(self): self.assertEqual(gocd.build_state_factory(event=gocd.Event.FAILS), gocd.BuildStateFailure())
def test_get_state_from_event_fixed(self): self.assertEqual(gocd.build_state_factory(event=gocd.Event.FIXED), gocd.BuildStateSuccess())
def test_get_state_from_event_pass(self): self.assertEqual(gocd.build_state_factory(event=gocd.Event.PASSES), gocd.BuildStateSuccess())