diff options
| author | Max Nanis | 2026-08-26 09:17:39 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-08-26 09:17:39 -0700 |
| commit | 47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7 (patch) | |
| tree | 0721a0145bf9db795ef442ca211caf9db2fad420 /tests/managers/thl/test_profiling/test_question.py | |
| parent | 3b4059135be47f7752a08e4277a85f9e57ceaa9d (diff) | |
| download | generalresearch-47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7.tar.gz generalresearch-47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7.zip | |
Ruff morning!
Diffstat (limited to 'tests/managers/thl/test_profiling/test_question.py')
| -rw-r--r-- | tests/managers/thl/test_profiling/test_question.py | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tests/managers/thl/test_profiling/test_question.py b/tests/managers/thl/test_profiling/test_question.py index 998466e..97e7365 100644 --- a/tests/managers/thl/test_profiling/test_question.py +++ b/tests/managers/thl/test_profiling/test_question.py @@ -1,3 +1,4 @@ +from collections.abc import Callable from uuid import uuid4 from generalresearch.managers.thl.profiling.question import QuestionManager @@ -6,7 +7,11 @@ from generalresearch.models import Source class TestQuestionManager: - def test_get_multi_upk(self, question_manager: QuestionManager, upk_data): + def test_get_multi_upk( + self, question_manager: QuestionManager, upk_data: Callable[..., None] + ): + upk_data() + qs = question_manager.get_multi_upk( question_ids=[ "8a22de34f985476aac85e15547100db8", @@ -17,13 +22,21 @@ class TestQuestionManager: ) assert len(qs) == 3 - def test_get_questions_ranked(self, question_manager: QuestionManager, upk_data): + def test_get_questions_ranked( + self, question_manager: QuestionManager, upk_data: Callable[..., None] + ): + upk_data() + qs = question_manager.get_questions_ranked(country_iso="mx", language_iso="spa") assert len(qs) >= 40 assert qs[0].importance.task_score > qs[40].importance.task_score assert all(q.country_iso == "mx" and q.language_iso == "spa" for q in qs) - def test_lookup_by_property(self, question_manager: QuestionManager, upk_data): + def test_lookup_by_property( + self, question_manager: QuestionManager, upk_data: Callable[..., None] + ): + upk_data() + q = question_manager.lookup_by_property( property_code="i:industry", country_iso="us", language_iso="eng" ) @@ -38,7 +51,11 @@ class TestQuestionManager: ) assert q.explanation_template - def test_filter_by_property(self, question_manager: QuestionManager, upk_data): + def test_filter_by_property( + self, question_manager: QuestionManager, upk_data: Callable[..., None] + ): + upk_data() + lookup = [ ("i:industry", "us", "eng"), ("i:industry", "mx", "eng"), |
