def test_should_create_form_submission_with_entity_id(self):
        answers = {"id": "1", "q1": "My Name", "q2": "40", "q3": "RED"}

        form_submission = FormSubmission(self.form_model, answers)

        self.assertEqual(form_submission.form_code, "AIDS")
        self.assertEqual(form_submission.short_code, "1")
 def _invalid_form_submission(self):
     return FormSubmission(self.form_model_mock, {}, {"field": "Invalid"})
 def _empty_form_submission(self):
     return FormSubmission(self.form_model_mock, {'eid': 'CID001'})
 def _valid_form_submission_with_choices(self):
     return FormSubmission(self.form_model_mock, {
         'eid': 'CID001',
         "location": "Pune",
         "favourite_colour": ['red']
     })
 def _invalid_form_submission_unicode(self):
     return FormSubmission(self.form_model_mock, {}, {"field": u"Āgra"})
 def _valid_form_submission_unicode(self):
     return FormSubmission(self.form_model_mock, {
         'eid': u'Āgra',
         "location": "Agra"
     })
 def _valid_form_submission(self):
     return FormSubmission(self.form_model_mock, {
         'eid': 'CID001',
         "location": "Pune"
     })