Exemplo n.º 1
0
    def test_get_email_from_fit_quiz(self):
        # user filled a fit quiz
        view = InquiryApplyWizard()
        view.initial_dict = {}

        # add the fit quiz email cookie to the session
        email = '*****@*****.**'
        request = self._get_request()
        request.session['fit_email'] = email
        request.session.save()
        view.request = request
        self.assertEqual(view._get_email({}, 'first'), email)
Exemplo n.º 2
0
 def test_get_email_no_client_session_or_form(self):
     # no fit quiz and the user messed up on the first step
     view = InquiryApplyWizard()
     view.initial_dict = {}
     view.request = self._get_request()
     self.assertEqual(view._get_email({}, 'first'), '')