Catches a few test updates mocking the objects
This commit is contained in:
parent
41e4287f9e
commit
a754528894
@ -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()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user