Testing holidays

This commit is contained in:
Sam Splunks 2024-03-27 16:04:30 +00:00
parent acecc41ec8
commit e3a745f81a

View File

@ -115,6 +115,11 @@ class TimeSpentAutoTestCase(TestCase):
"sunday": (0, 0), "sunday": (0, 0),
} }
# adding holidays
helpdesk_settings.FOLLOWUP_TIME_SPENT_EXCLUDE_HOLIDAYS = (
'2024-03-18', '2024-03-19', '2024-03-20', '2024-03-21', '2024-03-22',
)
# ticket creation date, follow-up creation date, assertion value # ticket creation date, follow-up creation date, assertion value
TEST_VALUES = ( TEST_VALUES = (
# monday # monday
@ -144,6 +149,10 @@ class TimeSpentAutoTestCase(TestCase):
# two weeks # two weeks
('2024-03-04T04:00:00+00:00', '2024-03-17T09:00:00+00:00', timedelta(hours=124)), ('2024-03-04T04:00:00+00:00', '2024-03-17T09:00:00+00:00', timedelta(hours=124)),
# three weeks, the third one is holidays
('2024-03-04T04:00:00+00:00', '2024-03-24T09:00:00+00:00', timedelta(hours=124)),
('2024-03-18T04:00:00+00:00', '2024-03-24T09:00:00+00:00', timedelta(hours=0)),
) )
for (ticket_time, fup_time, assertion_delta) in TEST_VALUES: for (ticket_time, fup_time, assertion_delta) in TEST_VALUES: