From 4dd9fb8745b921993711cf33cd7efda79cf44a3b Mon Sep 17 00:00:00 2001 From: juuso-j <68938778+juuso-j@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:24:16 +0200 Subject: [PATCH] Replace datetime.now() with timezone aware timezone.now() --- exceptional_situations/tests/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exceptional_situations/tests/conftest.py b/exceptional_situations/tests/conftest.py index 10e5f2a6a..a91ed5434 100644 --- a/exceptional_situations/tests/conftest.py +++ b/exceptional_situations/tests/conftest.py @@ -1,7 +1,8 @@ -from datetime import datetime, timedelta +from datetime import timedelta import pytest from django.contrib.gis.geos import GEOSGeometry +from django.utils import timezone from rest_framework.test import APIClient from exceptional_situations.models import ( @@ -11,7 +12,7 @@ SituationType, ) -NOW = datetime.now() +NOW = timezone.now() @pytest.fixture