Exemple #1
0
    def test_same_state_from_state(self):
        """
        Test if state is the same than the input state.
        """

        result = new_state(
            vertice=self.vertice,
            event={},
            state=Check.OK
        )
        self.assertFalse(result)
Exemple #2
0
    def test_same_state_from_event(self):
        """
        Test if state is the same than the one from an event.
        """

        result = new_state(
            vertice=self.vertice,
            event={'state': Check.OK}
        )

        self.assertFalse(result)
Exemple #3
0
    def test_new_state_from_event(self):
        """
        Test if state is different from an event.
        """

        result = new_state(
            vertice=self.vertice,
            event={'state': Check.MINOR}
        )

        self.assertTrue(result)
Exemple #4
0
    def test_new_state_from_state(self):
        """
        Test if state is different than the input state.
        """

        result = new_state(
            vertice=self.vertice,
            event={},
            state=Check.MINOR
        )

        self.assertTrue(result)