Esempio n. 1
0
 def test_eat_healthy(self):
     """eat should have a positive message for healthy eating"""
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli, because my body is a temple")
Esempio n. 2
0
 def test_eat_healthy_boolean(self):
     """is_healthy must be a bool"""
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares?")
Esempio n. 3
0
 def test_eat_healty(self):
     """ Positive message for healty eating """
     self.assertEqual(
         eat("broccoli", is_healty=True),
         "I'm eating broccoli, because it is healty")
Esempio n. 4
0
 def test_eat_unhealthy(self):
     """eat should indicate you've given up for eating unhealthy"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO!")
Esempio n. 5
0
 def test_eat_unhealty(self): 
     """ Message fo eating unhealty """        
     self.assertEqual(
         eat("pizza", is_healty=False),
         "I'm eating pizza, because it is good")