From f5bff3af4e50f738d4f1b90e0e22a04efc84f281 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:22:14 +0000 Subject: [PATCH] Clearing some settings at the end of test --- helpdesk/tests/test_time_spent_auto.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpdesk/tests/test_time_spent_auto.py b/helpdesk/tests/test_time_spent_auto.py index cd534910..6658b675 100644 --- a/helpdesk/tests/test_time_spent_auto.py +++ b/helpdesk/tests/test_time_spent_auto.py @@ -40,6 +40,7 @@ class TimeSpentAutoTestCase(TestCase): """Tests automatic time_spent calculation.""" # activate automatic calculation helpdesk_settings.FOLLOWUP_TIME_SPENT_AUTO = True + helpdesk_settings.USE_TZ = True # ticket creation date, follow-up creation date, assertion value TEST_VALUES = ( @@ -180,6 +181,9 @@ class TimeSpentAutoTestCase(TestCase): self.assertEqual(followup1.time_spent.total_seconds(), assertion_delta.total_seconds()) self.assertEqual(ticket.time_spent.total_seconds(), assertion_delta.total_seconds()) + # removing opening hours and holidays + helpdesk_settings.FOLLOWUP_TIME_SPENT_OPENING_HOURS = {} + helpdesk_settings.FOLLOWUP_TIME_SPENT_EXCLUDE_HOLIDAYS = () def test_followup_time_spent_auto_exclude_statuses(self): """Tests automatic time_spent calculation OPEN_STATUS exclusion."""