!112 !94: tests commons modules that contains most of the logic + zoneinfo (#113)

!112

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#113
This commit is contained in:
Thomas Kairos
2023-08-23 15:28:17 +02:00
parent f9ad81ddac
commit 2ce435fb5d
22 changed files with 253 additions and 108 deletions

View File

@ -1,7 +1,7 @@
import os
import sys
from zoneinfo import ZoneInfo
import pytz
from django.utils import timezone
sys.path.insert(1, os.path.dirname(os.path.realpath(__file__)))
@ -65,7 +65,7 @@ USE_I18N = True
USE_L10N = True
USE_TZ = True
timezone.activate(pytz.timezone(TIME_ZONE))
timezone.activate(ZoneInfo(TIME_ZONE))
try:
import locale

View File

@ -10,6 +10,7 @@ For Django settings see:
https://docs.djangoproject.com/en/3.1/topics/settings/
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from zoneinfo import ZoneInfo
from .prod import *
# FOR dev: from .dev import *
@ -20,7 +21,7 @@ LANGUAGE_CODE = "fr-BE"
LC_LOCALE = "fr_BE.UTF-8"
TIME_ZONE = "Europe/Brussels"
timezone.activate(pytz.timezone(TIME_ZONE))
timezone.activate(ZoneInfo(TIME_ZONE))
# Secret key: you MUST put a consistent secret key. You can generate one
# at https://djecrety.ir/