Refines the sanity check header, fixes other test issues

This commit is contained in:
Trenton Holmes
2022-05-30 17:29:30 -07:00
parent 37b19ea3ef
commit 4807576dac
4 changed files with 11 additions and 7 deletions

View File

@@ -63,9 +63,9 @@ class TestSanityCheck(DirectoriesMixin, TestCase):
self.assertTrue(messages.has_error)
with self.assertLogs() as capture:
messages.log_messages()
self.assertRegex(
self.assertEqual(
capture.records[0].message,
f"Document: {doc.pk}, title: {doc.title}",
f"Detected following issue(s) with document #{doc.pk}, titled {doc.title}",
)
self.assertRegex(capture.records[1].message, messageRegex)