def test_submission_import_worksheet_should_have_datasender_id(self): self.add_datasender_col() ans_dict = SubmissionWorkbookMapper(self.data, self.form_model).process() self.assertEquals( None, SubmissionWorkbookValidator(self.form_model).validate(ans_dict))
def test_validate_template_for_datasender(self): data = SubmissionWorkbookMapper(self.data, self.form_model).process() try: SubmissionWorkbookValidator(self.form_model).validate(data) except ImportValidationError as e: self.assertEquals( "The columns you are importing do not match the current Questionnaire. Please download the latest template for importing.", e.message)
def test_process_submission_import_worksheet_test_for_datasender(self): self.add_datasender_col() ans_dict = SubmissionWorkbookMapper(self.data, self.form_model).process() try: SubmissionWorkbookValidator(self.form_model).validate(ans_dict) except ImportValidationError as e: self.assertEquals( "The columns you are importing do not match the current Questionnaire. Please download the latest template for importing.", e.message)
def test_validate_template_for_datasender(self): data = SubmissionWorkbookMapper(self.data, self.form_model).process() try: SubmissionWorkbookValidator(self.form_model, is_org_user=False, is_summary_project=True).validate(data) except ImportValidationError as e: self.assertEquals( "The columns you are importing do not match. Please download the latest template for importing.", e.message)