aboutsummaryrefslogtreecommitdiff
path: root/tests/models/prodege/test_survey_participation.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/models/prodege/test_survey_participation.py')
-rw-r--r--tests/models/prodege/test_survey_participation.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/models/prodege/test_survey_participation.py b/tests/models/prodege/test_survey_participation.py
index 68d7838..10ce884 100644
--- a/tests/models/prodege/test_survey_participation.py
+++ b/tests/models/prodege/test_survey_participation.py
@@ -1,16 +1,19 @@
-from datetime import datetime, timedelta, timezone
+from __future__ import annotations
+
+from datetime import UTC, datetime, timedelta
+
+from generalresearch.models.prodege import ProdegePastParticipationType
+from generalresearch.models.prodege.survey import (
+ ProdegePastParticipation,
+ ProdegeUserPastParticipation,
+)
class TestProdegeParticipation:
def test_exclude(self):
- from generalresearch.models.prodege import ProdegePastParticipationType
- from generalresearch.models.prodege.survey import (
- ProdegePastParticipation,
- ProdegeUserPastParticipation,
- )
- now = datetime.now(tz=timezone.utc)
+ now = datetime.now(tz=UTC)
pp = ProdegePastParticipation.from_api(
{
"participation_project_ids": [152677146, 152803285],
@@ -84,12 +87,8 @@ class TestProdegeParticipation:
assert not pp.is_eligible(upps)
def test_include(self):
- from generalresearch.models.prodege.survey import (
- ProdegePastParticipation,
- ProdegeUserPastParticipation,
- )
- now = datetime.now(tz=timezone.utc)
+ now = datetime.now(tz=UTC)
pp = ProdegePastParticipation.from_api(
{
"participation_project_ids": [152677146, 152803285],