From 0df38b9844b0a036e889ea9efec035d83687e4b4 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 14 Apr 2026 20:55:13 -0700 Subject: [PATCH] test(fuzzy-match): use DocumentFactory in test_document_deletion_cancelled Co-Authored-By: Claude Sonnet 4.6 --- src/documents/tests/test_management_fuzzy.py | 25 ++++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/src/documents/tests/test_management_fuzzy.py b/src/documents/tests/test_management_fuzzy.py index bcd102db6..50c772a76 100644 --- a/src/documents/tests/test_management_fuzzy.py +++ b/src/documents/tests/test_management_fuzzy.py @@ -7,6 +7,7 @@ from django.core.management import call_command from django.test import TestCase from documents.models import Document +from documents.tests.factories import DocumentFactory @pytest.mark.management @@ -207,27 +208,9 @@ class TestFuzzyMatchCommand(TestCase): THEN: - No documents are deleted """ - Document.objects.create( - checksum="BEEFCAFE", - title="A", - content="first document scanned by bob", - mime_type="application/pdf", - filename="test.pdf", - ) - Document.objects.create( - checksum="DEADBEAF", - title="A", - content="second document scanned by alice", - mime_type="application/pdf", - filename="other_test.pdf", - ) - Document.objects.create( - checksum="CATTLE", - title="A", - content="first document scanned by pete", - mime_type="application/pdf", - filename="final_test.pdf", - ) + DocumentFactory(content="first document scanned by bob") + DocumentFactory(content="second document scanned by alice") + DocumentFactory(content="first document scanned by pete") self.assertEqual(Document.objects.count(), 3)