def test_get_hours_for_day_validation(self, mock_input): hours = timesheets.get_hours_for_day('whatever') self.assertEqual(2.4, hours)
def test_get_hours_for_day_hours_less_than24(self, mock_input): hours = timesheets.get_hours_for_day('Monday') self.assertEqual(9, hours)
def test_get_hours_for_day(self, mock_input): hours = timesheets.get_hours_for_day('Monday') self.assertEqual(2, hours)
def test_get_hours_for_day_hours_greater_than_zero(self, mock_input): hours = timesheets.get_hours_for_day('Monday') self.assertEqual(5, hours)
def test_get_hours_for_day_non_numeric_rejected(self, mock_input): hours = timesheets.get_hours_for_day('Monday') self.assertEqual(2, hours)
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
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)
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)