From e3a745f81a790563b51d4001dbaf43e8681b9135 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:04:30 +0000 Subject: [PATCH] Testing holidays --- helpdesk/tests/test_time_spent_auto.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helpdesk/tests/test_time_spent_auto.py b/helpdesk/tests/test_time_spent_auto.py index 285302bb..f925c30c 100644 --- a/helpdesk/tests/test_time_spent_auto.py +++ b/helpdesk/tests/test_time_spent_auto.py @@ -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: