Example #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")
Example #2
0
 def test_eat_healthy_boolean(self):
     """is_healthy must be a bool"""
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares?")
Example #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")
Example #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!")
Example #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")