From 6b6a96ad1d89eefde35d319e8a8424cea433da95 Mon Sep 17 00:00:00 2001 From: Francesco Filicetti Date: Thu, 2 Nov 2023 14:13:20 +0100 Subject: [PATCH] fix: statistics tests with GMT --- uniticket/api_rest/tests/test_02_statistics.py | 5 +++-- uniticket/tests/settings.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/uniticket/api_rest/tests/test_02_statistics.py b/uniticket/api_rest/tests/test_02_statistics.py index 8cd261ab..975c5581 100644 --- a/uniticket/api_rest/tests/test_02_statistics.py +++ b/uniticket/api_rest/tests/test_02_statistics.py @@ -63,8 +63,8 @@ def setUp(self): "organizational_office": self.office, "date_start": None, "date_end": None, - "created": "2020-05-08T09:30:02.759000+02:00", - "modified": "2022-04-11T13:02:23.178085+02:00", + "created": "2020-05-08T09:30:02.759000+00:00", + "modified": "2022-04-11T13:02:23.178085+00:00", "name": "Modello di richiesta di test", "slug": "modello-di-richiesta-di-test", "description": "Descrizione del modulo e delle sue finalità", @@ -103,6 +103,7 @@ def setUp(self): # I close the first 10 ticket.created = timezone.localtime() - timezone.timedelta(hours=i*10) ticket.add_competence(office=self.office, user=self.staff_2) + ticket.close(user=self.op1, motivazione = f"motivazione {i}") ticket.closed_by = self.op1 ticket.closed_date = timezone.localtime() + timezone.timedelta(hours=1) diff --git a/uniticket/tests/settings.py b/uniticket/tests/settings.py index 00d8f85e..16deb34f 100644 --- a/uniticket/tests/settings.py +++ b/uniticket/tests/settings.py @@ -115,7 +115,8 @@ # https://docs.djangoproject.com/en/2.1/topics/i18n/ LANGUAGE_CODE = 'en' -TIME_ZONE = 'Europe/Rome' +# TIME_ZONE = 'Europe/Rome' +TIME_ZONE = 'GMT' USE_I18N = True USE_L10N = True USE_TZ = True