def test_worktime_getter(self): wd = Workday(2021, 2, 1) wd.start_time = 7, 0 wd.end_time = 15, 30 self.assertEqual(timedelta(hours=8, minutes=30), wd.worktime)
def test_worktime_no_end_time(self): wd = Workday(2021, 2, 1) wd.start_time = 15, 30 self.assertEqual(timedelta(), wd.worktime)
def test_start_date_setter(self): wd = Workday(2021, 2, 1) wd.start_time = 7, 0 self.assertEqual(datetime(2021, 2, 1, 7, 0), wd.start_time)