aboutsummaryrefslogtreecommitdiff
path: root/tests/managers/thl/test_harmonized_uqa.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-21 17:19:41 -0700
committerMax Nanis2026-08-21 17:19:41 -0700
commit6cf7ccbaa8306700e64ada19d6f99807743b2865 (patch)
tree16ccde36ba2694b8c03bf8bdcee9cfcb2909046a /tests/managers/thl/test_harmonized_uqa.py
parent352520a2bd4ac066e90587e44d8b818043407917 (diff)
downloadgeneralresearch-6cf7ccbaa8306700e64ada19d6f99807743b2865.tar.gz
generalresearch-6cf7ccbaa8306700e64ada19d6f99807743b2865.zip
Ruff auto updates to 3.14
Diffstat (limited to 'tests/managers/thl/test_harmonized_uqa.py')
-rw-r--r--tests/managers/thl/test_harmonized_uqa.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/managers/thl/test_harmonized_uqa.py b/tests/managers/thl/test_harmonized_uqa.py
index 6bbbbe1..3b6df48 100644
--- a/tests/managers/thl/test_harmonized_uqa.py
+++ b/tests/managers/thl/test_harmonized_uqa.py
@@ -1,11 +1,11 @@
-from datetime import datetime, timezone
+from datetime import UTC, datetime, timezone
import pytest
from generalresearch.managers.thl.profiling.uqa import UQAManager
from generalresearch.models.thl.profiling.user_question_answer import (
- UserQuestionAnswer,
DUMMY_UQA,
+ UserQuestionAnswer,
)
from generalresearch.models.thl.user import User
@@ -18,7 +18,7 @@ class TestUQAManager:
assert len(uqas) == 0
def test_create(self, uqa_manager: UQAManager, user: User):
- now = datetime.now(tz=timezone.utc)
+ now = datetime.now(tz=UTC)
uqas = [
UserQuestionAnswer(
user_id=user.user_id,
@@ -38,7 +38,7 @@ class TestUQAManager:
assert res[0] == uqas[0]
# Same question, so this gets updated
- now = datetime.now(tz=timezone.utc)
+ now = datetime.now(tz=UTC)
uqas_update = [
UserQuestionAnswer(
user_id=user.user_id,
@@ -57,7 +57,7 @@ class TestUQAManager:
assert res[0] == uqas_update[0]
# Add a new answer
- now = datetime.now(tz=timezone.utc)
+ now = datetime.now(tz=UTC)
uqas_new = [
UserQuestionAnswer(
user_id=user.user_id,
@@ -103,7 +103,7 @@ class TestUQAManagerCache:
UserQuestionAnswer(
question_id="5d6d9f3c03bb40bf9d0a24f306387d7c",
answer=("1",),
- timestamp=datetime.now(tz=timezone.utc),
+ timestamp=datetime.now(tz=UTC),
country_iso="us",
language_iso="eng",
property_code="gr:gender",