From 8c4f6da2d7816aa28ffc09f0b46cfaa13a724a4b Mon Sep 17 00:00:00 2001 From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:53:46 -0700 Subject: [PATCH] Isolate the search index directory in trash-restore tests, they were using a persistent index --- src/documents/tests/test_api_trash.py | 3 ++- src/documents/tests/test_permission_filtering_security.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/documents/tests/test_api_trash.py b/src/documents/tests/test_api_trash.py index 65fb4306a..420b7727d 100644 --- a/src/documents/tests/test_api_trash.py +++ b/src/documents/tests/test_api_trash.py @@ -7,9 +7,10 @@ from rest_framework import status from rest_framework.test import APITestCase from documents.models import Document +from documents.tests.utils import DirectoriesMixin -class TestTrashAPI(APITestCase): +class TestTrashAPI(DirectoriesMixin, APITestCase): def setUp(self) -> None: super().setUp() diff --git a/src/documents/tests/test_permission_filtering_security.py b/src/documents/tests/test_permission_filtering_security.py index 6065d55a1..b169bf0a6 100644 --- a/src/documents/tests/test_permission_filtering_security.py +++ b/src/documents/tests/test_permission_filtering_security.py @@ -409,6 +409,7 @@ class TestBulkDownloadPermissionChecksRootDocument: @pytest.mark.django_db +@pytest.mark.usefixtures("_search_index") class TestTrashRestorePermissionBoundary: def test_restore_rejects_document_without_delete_permission( self,