Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juuso-j committed Mar 8, 2024
1 parent 2ff5962 commit 5191a6f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions profiles/tests/test_import_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ def test_import_questions():
assert "Hjort" in results_qs[4].value_sv
assert "Deer" in results_qs[4].value_en
assert results_qs[0].num_options == 38
assert results_qs[4].num_options == 47
assert results_qs[1].num_options == 29
assert results_qs[2].num_options == 32
assert results_qs[3].num_options == 38
assert results_qs[4].num_options == 52
assert results_qs[5].num_options == 60

# Test questions
assert Question.objects.count() == 17
Expand Down Expand Up @@ -79,7 +83,7 @@ def test_import_questions():

question4 = Question.objects.get(number="4")
assert question4.mandatory_number_of_sub_questions_to_answer == "*"
assert SubQuestion.objects.filter(question=question4).count() == 6
assert SubQuestion.objects.filter(question=question4).count() == 7
joukkoliikenne = SubQuestion.objects.get(question=question4, order_number=2)
assert (
joukkoliikenne.additional_description
Expand Down Expand Up @@ -124,7 +128,7 @@ def test_import_questions():
assert Question.objects.filter(number=number).count() == 0
# Test other options
other_options_qs = Option.objects.filter(is_other=True)
assert other_options_qs.count() == 15
assert other_options_qs.count() == 17
# Test has matched "//Other"
assert (
other_options_qs.filter(question=Question.objects.get(number="1a")).exists()
Expand Down

0 comments on commit 5191a6f

Please sign in to comment.