Fixes formatting

This commit is contained in:
Trenton Holmes 2022-06-01 08:08:03 -07:00
parent 9335b0779c
commit 0b6e73840a
2 changed files with 5 additions and 2 deletions

View File

@ -137,7 +137,7 @@ def check_sanity(progress=False) -> SanityCheckMessages:
# other document checks
if not doc.content:
messages.info(doc.pk, "Document has no content.")
messages.info(doc.pk, "Document contains no OCR data")
for extra_file in present_files:
messages.warning(None, f"Orphaned file in media dir: {extra_file}")

View File

@ -143,7 +143,10 @@ class TestSanityCheck(DirectoriesMixin, TestCase):
self.assertFalse(messages.has_error)
self.assertFalse(messages.has_warning)
self.assertEqual(len(messages), 1)
self.assertRegex(messages[doc.pk][0]["message"], "Document contains no OCR data.")
self.assertRegex(
messages[doc.pk][0]["message"],
"Document contains no OCR data",
)
def test_orphaned_file(self):
doc = self.make_test_data()