Ejemplo n.º 1
0
def sanity_check():
    messages = sanity_checker.check_sanity()

    if len(messages) > 0:
        raise SanityFailedError(messages)
    else:
        return "No issues detected."
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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()))