Exemple #1
0
def fake_questionnaire_store_no_submitted_at():
    storage = Mock()
    storage.get_user_data = Mock(return_value=("{}", "ce_sid", 1, None))
    questionnaire_store = QuestionnaireStore(storage)
    questionnaire_store.submitted_at = None
    questionnaire_store.metadata = {}
    questionnaire_store.answer_store = AnswerStore()
    return questionnaire_store
Exemple #2
0
def fake_questionnaire_store():
    storage = Mock()
    storage.get_user_data = Mock(return_value=("{}", "ce_sid", 1, None))
    questionnaire_store = QuestionnaireStore(storage)
    questionnaire_store.submitted_at = SUBMITTED_AT
    questionnaire_store.metadata = {"tx_id": "123456789", "ru_name": "Apple"}
    questionnaire_store.answer_store = AnswerStore(
        [
            Answer("name-answer", "John Smith", None).to_dict(),
            Answer("address-answer", "NP10 8XG", None).to_dict(),
        ]
    )
    return questionnaire_store