def test_question_serializer(answer):
    with scope(event=answer.question.event):
        data = AnswerSerializer(answer).data
        assert set(data.keys()) == {
            "id",
            "question",
            "answer",
            "answer_file",
            "submission",
            "person",
            "review",
            "options",
        }
        data = QuestionSerializer(answer.question).data
    assert set(data.keys()) == {
        "id",
        "variant",
        "question",
        "required",
        "target",
        "options",
        "help_text",
        "default_answer",
        "contains_personal_data",
        "min_length",
        "max_length",
        "is_public",
        "is_visible_to_reviewers",
    }
Beispiel #2
0
def test_question_serializer(answer):
    data = AnswerSerializer(answer).data
    assert set(data.keys()) == {
        'id', 'question', 'answer', 'answer_file', 'submission', 'person', 'options',
    }
    data = QuestionSerializer(answer.question).data
    assert set(data.keys()) == {
        'id', 'question', 'required', 'target', 'options',
    }
Beispiel #3
0
def test_question_serializer(answer):
    with scope(event=answer.question.event):
        data = AnswerSerializer(answer).data
        assert set(data.keys()) == {
            "id",
            "question",
            "answer",
            "answer_file",
            "submission",
            "person",
            "options",
        }
        data = QuestionSerializer(answer.question).data
    assert set(
        data.keys()) == {"id", "question", "required", "target", "options"}