Пример #1
0
    def test_occupied_should_not_switch_to_empty(self):
        # GIVEN
        context = [Point(1, 1, x) for x in three_occupied_context]
        p = Point(1, 2, Point.OCCUPIED)
        p.set_context(context)

        # WHEN
        status = p.new_status()

        # THEN
        self.assertEqual(status, Point.OCCUPIED)
Пример #2
0
    def test_floor_should_never_switch(self):
        # GIVEN
        context = [Point(1, x, '.') for x in range(8)]
        p = Point(1, 2, Point.FLOOR)
        p.set_context(context)

        # WHEN
        status = p.new_status()

        # THEN
        self.assertEqual(status, Point.FLOOR)