Esempio n. 1
0
 def persisted_triage_answers(self):
     answer_manager = helpers.TriageAnswersManager(self.request)
     return answer_manager.retrieve_answers()
Esempio n. 2
0
def test_triage_manager_anon_user_returns_session(anon_request):
    manager = helpers.TriageAnswersManager(anon_request)

    assert isinstance(manager, helpers.SessionTriageAnswersManager)
Esempio n. 3
0
 def done(self, *args, **kwargs):
     answers = forms.serialize_triage_form(self.get_all_cleaned_data())
     answer_manager = helpers.TriageAnswersManager(self.request)
     answer_manager.persist_answers(answers)
     return redirect(self.success_url)
Esempio n. 4
0
def test_triage_manager_sso_user_returns_database(sso_request):
    manager = helpers.TriageAnswersManager(sso_request)

    assert isinstance(manager, helpers.DatabaseTriageAnswersManager)