Example #1
0
class TestWithCaptive(TestSpace):
    def setUp(self):
        super(TestWithCaptive, self).setUp()
        self.captive = Captive()
        self.floor.add(self.captive, 0, 0)
        self.space = self.floor.space(0, 0)

    def test_should_be_captive(self):
        self.assertTrue(self.space.is_captive())

    def test_should_not_be_enemy(self):
        self.assertFalse(self.space.is_enemy())

    def test_should_be_ticking_if_captive_has_time_bomb(self):
        self.captive.add_abilities('explode_')
        self.assertTrue(self.space.is_ticking())

    def test_should_not_be_ticking_if_captive_does_not_have_time_bomb(self):
        self.assertFalse(self.space.is_ticking())
Example #2
0
class TestWithCaptive(TestSpace):
    def setUp(self):
        super(TestWithCaptive, self).setUp()
        self.captive = Captive()
        self.floor.add(self.captive, 0, 0)
        self.space = self.floor.space(0, 0)

    def test_should_be_captive(self):
        self.assertTrue(self.space.is_captive())

    def test_should_not_be_enemy(self):
        self.assertFalse(self.space.is_enemy())

    def test_should_be_ticking_if_captive_has_time_bomb(self):
        self.captive.add_abilities('explode_')
        self.assertTrue(self.space.is_ticking())

    def test_should_not_be_ticking_if_captive_does_not_have_time_bomb(self):
        self.assertFalse(self.space.is_ticking())