diff options
| author | Max Nanis | 2026-08-24 17:12:54 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-08-24 17:12:54 -0700 |
| commit | 5682f48a96b0713929a4bb52e72eec5907d5dd32 (patch) | |
| tree | 3e5ba728145cf69f4ea0fde48e630b341c164cd0 /tests/managers/thl/test_survey.py | |
| parent | 979efd01b0c61d493d1fef3dff9885f5d38a8975 (diff) | |
| download | generalresearch-5682f48a96b0713929a4bb52e72eec5907d5dd32.tar.gz generalresearch-5682f48a96b0713929a4bb52e72eec5907d5dd32.zip | |
pytest fixture annotations, ruf manual edits
Diffstat (limited to 'tests/managers/thl/test_survey.py')
| -rw-r--r-- | tests/managers/thl/test_survey.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/managers/thl/test_survey.py b/tests/managers/thl/test_survey.py index 117a6aa..eec7c3b 100644 --- a/tests/managers/thl/test_survey.py +++ b/tests/managers/thl/test_survey.py @@ -174,9 +174,9 @@ class TestSurvey: qs = sorted(qs, key=lambda x: x.importance.task_count if x.importance else 0) # qd = {q.id: q for q in qs} - q = [x for x in qs if x.ext_question_id == "i:adhoc_13126"][0] + q = next(x for x in qs if x.ext_question_id == "i:adhoc_13126") q.explanation_template = "You have been diagnosed with: {answer}." - q = [x for x in qs if x.ext_question_id == "gr:gender"][0] + q = next(x for x in qs if x.ext_question_id == "gr:gender") q.explanation_template = "Your gender is {answer}." ecs = [] @@ -251,9 +251,9 @@ class TestSurveyStat: survey_stats.append(ss) print(len(survey_stats)) print(survey_stats[12].natural_key, survey_stats[2000].natural_key) - print(f"----a-----: {datetime.now().isoformat()}") + print(f"----a-----: {datetime.now(tz=UTC).isoformat()}") res = surveystat_manager.update_or_create(survey_stats) - print(f"----b-----: {datetime.now().isoformat()}") + print(f"----b-----: {datetime.now(tz=UTC).isoformat()}") assert len(res) == 20_000 return |
