Verified Commit 35c68853 authored by Erxleben, Fredo (FWCC) - 136987's avatar Erxleben, Fredo (FWCC) - 136987
Browse files

Adapt tests to changed API of AnswerOption.from_yaml_dictionary()



I had to additionally provide the answer type, but since the tests establish no context between answer option and question, basically anything works, and I chose a mostly versatile type.
Signed-off-by: Erxleben, Fredo (FWCC) - 136987's avatarFredo Erxleben <f.erxleben@hzdr.de>
parent 1ad2ce8c
Pipeline #105442 passed with stages
in 2 minutes and 40 seconds
......@@ -62,7 +62,8 @@ class TestAnswerOption(object):
answer_option: AnswerOption = AnswerOption.from_yaml_dictionary(
yaml=metadata_fixture[0],
parent_id=TestAnswerOption.question_id,
settings=settings_fixture
settings=settings_fixture,
answer_type=str
)
# Make sure that object retrieved from metadata YAML file given is of
# type AnswerOption.
......@@ -89,7 +90,8 @@ class TestAnswerOption(object):
answer_option: AnswerOption = AnswerOption.from_yaml_dictionary(
yaml=metadata_fixture[0],
parent_id=TestAnswerOption.question_id,
settings=settings_fixture
settings=settings_fixture,
answer_type=str
)
actual_answer_option_id: str = answer_option.short_id
# Make sure that AnswerOption object retrieved from metadata YAML file
......@@ -117,7 +119,8 @@ class TestAnswerOption(object):
answer_option: AnswerOption = AnswerOption.from_yaml_dictionary(
yaml=metadata_fixture[0],
parent_id=TestAnswerOption.question_id,
settings=settings_fixture
settings=settings_fixture,
answer_type=str
)
actual_translated_answer_option_text: str = (
answer_option.text(TestAnswerOption.language_code)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment