From 77ae09916d944d5f3e4cea29f4dc3fe9eee5de27 Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Thu, 18 Sep 2025 16:27:11 +0200 Subject: [PATCH] [6.0.x] Added cleanup of cache clearing to DjangoFilePrefixesTests.setUp(). Backport of 7528979153355faa49c3e49ba3ea233f998a7583 from main. --- tests/deprecation/tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py index 3d384b38b7..2df9cc6fa2 100644 --- a/tests/deprecation/tests.py +++ b/tests/deprecation/tests.py @@ -13,6 +13,7 @@ from django.utils.deprecation import ( class DjangoFilePrefixesTests(SimpleTestCase): def setUp(self): django_file_prefixes.cache_clear() + self.addCleanup(django_file_prefixes.cache_clear) def test_no_file(self): orig_file = django.__file__