Catches a few test updates mocking the objects

This commit is contained in:
Trenton Holmes 2024-10-27 18:11:00 -07:00 committed by Trenton H
parent 41e4287f9e
commit a754528894

View File

@ -150,7 +150,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
with ( with (
mock.patch( mock.patch(
"documents.signals.handlers.Document.objects.filter", "documents.signals.handlers.Document.global_objects.filter",
) as m, ) as m,
disable_auditlog(), disable_auditlog(),
): ):
@ -865,7 +865,9 @@ class TestFileHandlingWithArchive(DirectoriesMixin, FileSystemAssertsMixin, Test
archive_filename="0000001.pdf", archive_filename="0000001.pdf",
archive_checksum="B", archive_checksum="B",
) )
with mock.patch("documents.signals.handlers.Document.objects.filter") as m: with mock.patch(
"documents.signals.handlers.Document.global_objects.filter",
) as m:
m.side_effect = DatabaseError() m.side_effect = DatabaseError()
doc.save() doc.save()