Beispiel #1
0
 def test_get_hours_for_day_validation(self, mock_input):
     hours = timesheets.get_hours_for_day('whatever')
     self.assertEqual(2.4, hours)
Beispiel #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)
Beispiel #3
0
 def test_get_hours_for_day(self, mock_input):
     hours = timesheets.get_hours_for_day('Monday')
     self.assertEqual(2, hours)
Beispiel #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)
Beispiel #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)
Beispiel #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
Beispiel #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)
Beispiel #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)