aboutsummaryrefslogtreecommitdiff
path: root/test_utils/conftest.py
diff options
context:
space:
mode:
authorstuppie2026-03-11 18:17:09 -0600
committerstuppie2026-03-11 18:17:09 -0600
commitb0306293ef52816998a463fbfe4c5b97d00b9b65 (patch)
treeb166bf6026885d0abf455a2a915f9ad665c52748 /test_utils/conftest.py
parent36837ab6255b923c819650a3c0db9db7d0c5ba57 (diff)
downloadgeneralresearch-b0306293ef52816998a463fbfe4c5b97d00b9b65.tar.gz
generalresearch-b0306293ef52816998a463fbfe4c5b97d00b9b65.zip
network: completely rename and reorganize everything with consistent naming
Diffstat (limited to 'test_utils/conftest.py')
-rw-r--r--test_utils/conftest.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/test_utils/conftest.py b/test_utils/conftest.py
index 187ff58..0e712bb 100644
--- a/test_utils/conftest.py
+++ b/test_utils/conftest.py
@@ -4,6 +4,7 @@ from os.path import join as pjoin
from pathlib import Path
from typing import TYPE_CHECKING, Callable
from uuid import uuid4
+from datetime import datetime, timedelta, timezone
import pytest
import redis
@@ -17,8 +18,6 @@ from generalresearch.redis_helper import RedisConfig
from generalresearch.sql_helper import SqlHelper
if TYPE_CHECKING:
- from datetime import datetime
-
from generalresearch.config import GRLBaseSettings
from generalresearch.currency import USDCent
from generalresearch.models.thl.session import Status
@@ -38,6 +37,7 @@ def env_file_path(pytestconfig: Config) -> str:
@pytest.fixture(scope="session")
def settings(env_file_path: str) -> "GRLBaseSettings":
from generalresearch.config import GRLBaseSettings
+
print(f"{env_file_path=}")
s = GRLBaseSettings(_env_file=env_file_path)
@@ -203,16 +203,12 @@ def wall_status(request) -> "Status":
@pytest.fixture
-def utc_now() -> "datetime":
- from datetime import datetime, timezone
-
+def utc_now() -> datetime:
return datetime.now(tz=timezone.utc)
@pytest.fixture
-def utc_hour_ago() -> "datetime":
- from datetime import datetime, timedelta, timezone
-
+def utc_hour_ago() -> datetime:
return datetime.now(tz=timezone.utc) - timedelta(hours=1)