From 06e9c1c02b3c2eed98d4df67fb1f0e5a8659d332 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Mon, 31 Aug 2026 07:43:14 -0700 Subject: [PATCH] Chore: Isolate the search index directory in trash-restore tests, they were using a persistent index (#13876) --- 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,