Exemple #1
0
 def test_eat_healthy(self):
     """assert if a == b, eat healthy should have positive message"""
     self.assertEqual(
         # execute functionality with target input
         eat("broccoli", is_healthy=True),
         # define expected output
         "I'm eating broccoli, because my body is a temple.")
Exemple #2
0
 def test_no_eat(self):
     """ Eat should have a positive message for healthy eating """
     self.assertEqual(eat("", is_healthy=None), "I'm not really hungry")
Exemple #3
0
 def test_eat_unhealthily(self):
     """Indicate you've given up for eating unhealthily."""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO!")
 def test_eat_unhealthy(self):
     """Testing for unhealthy food eat function"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO")
Exemple #5
0
 def test_eat(self):
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli, because my body is a temple")
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO")
Exemple #6
0
 def test_eat_healthy(self):
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli because my body is a temple")
Exemple #7
0
	def test_eat_unhealthy(self):
		self.assertEqual(
			eat("pizza", ishealthy=False),
			"I'm eating broccoli, because YOLO."
			)
Exemple #8
0
 def test_eat_unhealthy(self):
     """Testing for eating un healthy, should have an unhealthy message"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO!")
Exemple #9
0
 def test_eat_healthy(self):
     """eat should have a positive message for healthy eating"""
     self.assertEqual(eat('broccoli', is_healthy=True),
                      'Im eating broccoli, because my body is a temple')
Exemple #10
0
 def test_eat_healthy_boolean(self):
     """is healthy must be a bool"""
     with self.assertRaises(ValueError):
         eat('pizza', is_healthy='who cars')
Exemple #11
0
 def test_eat_unhealthy(self):
     """eat should indicate you've given up on healthy eating"""
     self.assertEqual(eat('pizza', is_healthy=False),
                      'Im eating pizza, because YOLO')
Exemple #12
0
 def test_eat_unhealthy_bool(self):
     """is healthy must be a boolean"""
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who gives?")
Exemple #13
0
 def test_eat_unhealthy(self):
     """You gave up healthy eating"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I am eating pizza because YOLO!")
Exemple #14
0
 def test_eat_boolean(self):
     """ No value error passed """
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares?")
Exemple #15
0
 def test_eat_healthy_boolean(self):
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares")
Exemple #16
0
 def test_eat_healthy(self):
     """eat should have positive message for healthy eating"""
     self.assertEqual(
         eat("broccoli", is_healthy=True),
         "I'm eating broccoli, because its Healthy food")
Exemple #17
0
 def test_eat_healthy(self):
     """eat should return positive message for healthy eating"""
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli, because my body is a temple")
Exemple #18
0
 def test_eat_unhealthy(self):
     """Eat should have a f**k it message for unhealthy eating"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza because YOLO!")
Exemple #19
0
 def test_eat_healthy(self):
     """Testing for eating healthy, should have healthy message"""
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli, its healthy")
Exemple #20
0
 def test_eat_unhealthy(self):
     ''' eat should indicate you've given up eating healthy'''
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO")
Exemple #21
0
	def test_eat_healthy_boolean(self):
		with self.assertRaises(ValueError):
			eat('pizza', ishealthy="who cares?")
Exemple #22
0
 def test_eat_healthy(self):
     """Testing eat healthy"""
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli because is healthy")
Exemple #23
0
 def test_eat_unhealthy(self):
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eathing pizza because YOLO")
Exemple #24
0
 def test_eat_unhealthy(self):
     """Testing eat unhealthy"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza because is delicious")
Exemple #25
0
 def test_eat_healthy_boolean(self):
     """is_healthy must be a bool"""
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares?")
Exemple #26
0
 def test_eat_boolean(self):
     """Testing a boolean parameter"""
     with self.assertRaises(ValueError):
         eat("pizza", "?")
 def test_eat_healthy(self):
     """Testing for healthy food eat function"""
     self.assertEqual(eat("brocolli", is_healthy=True),
                      "I'm eating brocolli, because my body is a temple.")
Exemple #28
0
 def test_eat_unhealthly(self):
     """Eat should indicate you've given up for eating healthy food."""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO!")
Exemple #29
0
 def test_eat_healthily(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.")
Exemple #30
0
 def test_eat_junk(self):
     """Eat should have a negative message for crappy eating habits"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO.")