Example #1
0
    def test_16_error_report_cell_refs_columns(self):
        sheet = reapplication.open_csv("invalid.csv")

        with self.assertRaises(reapplication.ContentValidationException):
            try:
                fcs, skip = reapplication.validate_csv_contents(sheet)
            except reapplication.ContentValidationException as e:
                report = reapplication.generate_spreadsheet_error_object(sheet, e)

                assert report["6529-5440"].has_key(56), report["6529-5440"]
                assert report["6529-5440"][56] == (
                            "6529-5440",
                            "53) Enter the URL where this information can be found **",
                            56,
                            "AO",  # the 41st column should be AO. AA is the 27th, AO is 14 after that (O is the 15th letter in the alphabet)
                            "Invalid URL."
                       ), report["6529-5440"][56]
                raise e
Example #2
0
    def test_15_error_report_cell_refs_rows(self):
        sheet = reapplication.open_csv("invalid.csv")

        with self.assertRaises(reapplication.ContentValidationException):
            try:
                fcs, skip = reapplication.validate_csv_contents(sheet)
            except reapplication.ContentValidationException as e:
                report = reapplication.generate_spreadsheet_error_object(sheet, e)

                assert report["4567-8901"].has_key(56), report["4567-8901"]
                assert report["4567-8901"][56] == (
                            "4567-8901",
                            "53) Enter the URL where this information can be found **",
                            56,
                            "E",
                            "Invalid URL."
                       ), report["4567-8901"][56]
                raise e