def test_after_running_or_shooting_a_bow_three_times_it_gets_cranky(self): centaur = Centaur('George','Palomino') self.assertFalse(centaur.is_cranky()) centaur.shoot() centaur.run() centaur.shoot() self.assertTrue(centaur.is_cranky())
def test_after_sleeping_it_is_no_longer_cranky(self): centaur = Centaur('George','Palomino') centaur.shoot() centaur.run() centaur.shoot() self.assertTrue(centaur.is_cranky()) centaur.lay_down() centaur.sleep() self.assertFalse(centaur.is_cranky()) centaur.stand_up() self.assertEqual(centaur.shoot(), 'Twang!!!') self.assertEqual(centaur.run(), 'Clop clop clop clop!!!')
def test_when_laying_down_it_cannot_shoot_a_bow(self): centaur = Centaur('George','Palomino') centaur.lay_down() self.assertEqual(centaur.shoot(), 'NO!')
def test_when_cranky_it_will_not_run(self): centaur = Centaur('George','Palomino') for _ in range(3): centaur.shoot() self.assertEqual(centaur.run(), 'NO!')
def test_it_has_excellent_bow_skills(self): centaur = Centaur('George','Palomino') self.assertEqual(centaur.shoot(), 'Twang!!!')