Exemplo n.º 1
0
    def test_get_state_from_event_cancelled(self):

        self.assertEqual(gocd.build_state_factory(event=gocd.Event.CANCELLED),
                         gocd.BuildStateUnknown())
Exemplo n.º 2
0
 def test_unknown_to_red(self):
     self.assertEqual(
         gocd.BuildStateFailure().after(gocd.BuildStateUnknown()),
         gocd.Event.BREAKS)
Exemplo n.º 3
0
 def test_something_to_unknown(self):
     self.assertEqual(
         gocd.BuildStateUnknown().after(gocd.BuildStateUnknown()), None)
Exemplo n.º 4
0
    def test_unknown_to_green(self):

        self.assertEqual(
            gocd.BuildStateSuccess().after(gocd.BuildStateUnknown()),
            gocd.Event.FIXED)