Exemplo n.º 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.")
Exemplo n.º 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")
Exemplo n.º 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!")
Exemplo n.º 4
0
 def test_eat_unhealthy(self):
     """Testing for unhealthy food eat function"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza, because YOLO")
Exemplo n.º 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")
Exemplo n.º 6
0
 def test_eat_healthy(self):
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli because my body is a temple")
Exemplo n.º 7
0
	def test_eat_unhealthy(self):
		self.assertEqual(
			eat("pizza", ishealthy=False),
			"I'm eating broccoli, because YOLO."
			)
Exemplo n.º 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!")
Exemplo n.º 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')
Exemplo n.º 10
0
 def test_eat_healthy_boolean(self):
     """is healthy must be a bool"""
     with self.assertRaises(ValueError):
         eat('pizza', is_healthy='who cars')
Exemplo n.º 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')
Exemplo n.º 12
0
 def test_eat_unhealthy_bool(self):
     """is healthy must be a boolean"""
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who gives?")
Exemplo n.º 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!")
Exemplo n.º 14
0
 def test_eat_boolean(self):
     """ No value error passed """
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares?")
Exemplo n.º 15
0
 def test_eat_healthy_boolean(self):
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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!")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 21
0
	def test_eat_healthy_boolean(self):
		with self.assertRaises(ValueError):
			eat('pizza', ishealthy="who cares?")
Exemplo n.º 22
0
 def test_eat_healthy(self):
     """Testing eat healthy"""
     self.assertEqual(eat("broccoli", is_healthy=True),
                      "I'm eating broccoli because is healthy")
Exemplo n.º 23
0
 def test_eat_unhealthy(self):
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eathing pizza because YOLO")
Exemplo n.º 24
0
 def test_eat_unhealthy(self):
     """Testing eat unhealthy"""
     self.assertEqual(eat("pizza", is_healthy=False),
                      "I'm eating pizza because is delicious")
Exemplo n.º 25
0
 def test_eat_healthy_boolean(self):
     """is_healthy must be a bool"""
     with self.assertRaises(ValueError):
         eat("pizza", is_healthy="who cares?")
Exemplo n.º 26
0
 def test_eat_boolean(self):
     """Testing a boolean parameter"""
     with self.assertRaises(ValueError):
         eat("pizza", "?")
Exemplo n.º 27
0
 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.")
Exemplo n.º 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!")
Exemplo n.º 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.")
Exemplo n.º 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.")