Ejemplo n.º 1
0
 def test_get_hours_for_day_validation(self, mock_input):
     hours = timesheets.get_hours_for_day('whatever')
     self.assertEqual(2.4, hours)
Ejemplo n.º 2
0
 def test_get_hours_for_day_hours_less_than24(self, mock_input):
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(9, hours)
Ejemplo n.º 3
0
 def test_get_hours_for_day(self, mock_input):
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(2, hours)
Ejemplo n.º 4
0
 def test_get_hours_for_day_hours_greater_than_zero(self, mock_input):
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(5, hours)
Ejemplo n.º 5
0
 def test_get_hours_for_day_non_numeric_rejected(self, mock_input):
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(2, hours)
Ejemplo n.º 6
0
 def test_get_hours_for_day(
     self, mock_input
 ):  # the arguement mock_input can be named anything, it is a reference to the mock object, required to have this arguement here
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(2, hours)  # Assert the value we want
Ejemplo n.º 7
0
 def test_get_hours_for_day_invaild(
         self, mock_input):  # Mock input can be anything
     hours = timesheets.get_hours_for_day('whatever')
     self.assertEqual(2, hours)
Ejemplo n.º 8
0
 def test_get_hours_for_day_numbers_not_between_valid_range(
         self, mock_input):
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(2, hours)