def sanity_check(): messages = sanity_checker.check_sanity() if len(messages) > 0: raise SanityFailedError(messages) else: return "No issues detected."
def test_error_tostring(self): Document.objects.create(title="test", checksum="dgfhj", archive_checksum="dfhg", content="", pk=1, filename="0000001.pdf", archive_filename="0000001.pdf") string = str(SanityFailedError(check_sanity())) self.assertIsNotNone(string)
def test_all(self): Document.objects.create(title="test", checksum="dgfhj", archive_checksum="dfhg", content="", pk=1, filename="0000001.pdf") string = str(SanityFailedError(check_sanity()))