From a754528894a011bb73a66d6e91b674e761e6f42c Mon Sep 17 00:00:00 2001 From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:11:00 -0700 Subject: [PATCH] Catches a few test updates mocking the objects --- src/documents/tests/test_file_handling.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/documents/tests/test_file_handling.py b/src/documents/tests/test_file_handling.py index e942b4daa..476068a51 100644 --- a/src/documents/tests/test_file_handling.py +++ b/src/documents/tests/test_file_handling.py @@ -150,7 +150,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase): with ( mock.patch( - "documents.signals.handlers.Document.objects.filter", + "documents.signals.handlers.Document.global_objects.filter", ) as m, disable_auditlog(), ): @@ -865,7 +865,9 @@ class TestFileHandlingWithArchive(DirectoriesMixin, FileSystemAssertsMixin, Test archive_filename="0000001.pdf", 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() doc.save()