mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 01:13:31 +01:00
Testing holidays
This commit is contained in:
parent
acecc41ec8
commit
e3a745f81a
@ -115,6 +115,11 @@ class TimeSpentAutoTestCase(TestCase):
|
||||
"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
|
||||
TEST_VALUES = (
|
||||
# monday
|
||||
@ -144,6 +149,10 @@ class TimeSpentAutoTestCase(TestCase):
|
||||
|
||||
# two weeks
|
||||
('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:
|
||||
|
Loading…
Reference in New Issue
Block a user