From cb0fe7b5fc22cb5790ea4eba81326cbd2817ede8 Mon Sep 17 00:00:00 2001 From: Simone Robutti Date: Fri, 4 Mar 2022 10:45:11 +0100 Subject: [PATCH] set timezone to Rome (#153) --- tests/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 5292487..442e112 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,7 @@ import importlib.resources import os from collections import UserList from datetime import datetime, timedelta, timezone +import time from typing import Union from uuid import UUID @@ -36,6 +37,12 @@ def generate_publication_status(published): return PublicationStatus.COMPLETED if published else PublicationStatus.WAITING +@pytest.fixture(autouse=True) +def set_timezone(): + os.environ["TZ"] = "Europe/Rome" + time.tzset() + + def generate_event_status(published): return ( EventPublicationStatus.COMPLETED