Skip to content

Commit

Permalink
Add small test for unset answer_type and widget choices
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed May 24, 2024
1 parent 5eca1cb commit 376c88e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/tests/reader_studies_tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,12 +1394,16 @@ def test_display_set_add_interface_form():
("SELECT_MULTIPLE", "Select Multiple"),
],
),
(None, BLANK_CHOICE_DASH),
(AnswerType.MASK, BLANK_CHOICE_DASH),
),
)
def test_question_form_answer_widget_choices(answer_type, choices):
form = QuestionForm(
reader_study=ReaderStudyFactory(), initial={"answer_type": answer_type}
reader_study=ReaderStudyFactory(),
initial=(
{"answer_type": answer_type} if answer_type is not None else {}
),
)
assert form.widget_choices() == choices

Expand Down

0 comments on commit 376c88e

Please sign in to comment.