set timezone to Rome (#153)

This commit is contained in:
Simone Robutti 2022-03-04 10:45:11 +01:00 committed by GitHub
parent f04942eefe
commit cb0fe7b5fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import importlib.resources
import os import os
from collections import UserList from collections import UserList
from datetime import datetime, timedelta, timezone from datetime import datetime, timedelta, timezone
import time
from typing import Union from typing import Union
from uuid import UUID from uuid import UUID
@ -36,6 +37,12 @@ def generate_publication_status(published):
return PublicationStatus.COMPLETED if published else PublicationStatus.WAITING 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): def generate_event_status(published):
return ( return (
EventPublicationStatus.COMPLETED EventPublicationStatus.COMPLETED