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 0a34a4a7ad
commit be304e37b4
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)