diff --git a/pytest_docker_compose/plugin.py b/pytest_docker_compose/plugin.py index 2ea87f5..661308e 100644 --- a/pytest_docker_compose/plugin.py +++ b/pytest_docker_compose/plugin.py @@ -1,6 +1,6 @@ import os.path import warnings -from datetime import datetime +from datetime import datetime, timezone from pathlib import Path import pytest @@ -222,7 +222,7 @@ def generate_scoped_containers_fixture(cls, scope: str): @pytest.fixture(scope=scope) # type: ignore def scoped_containers_fixture(docker_project: DockerClient, request): - now = datetime.utcnow() + now = datetime.now(timezone.utc) if not request.config.getoption("--use-running-containers"): if any( (