From d88ec42bd0a37340c8477a6f20bf26e58bd84735 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Sun, 31 Dec 2023 10:01:31 +0100 Subject: Used addCleanup() in tests where appropriate. --- tests/app_loading/tests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/app_loading') diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index 1499115386..d8a837c2f6 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -8,9 +8,7 @@ from django.test.utils import extend_sys_path class EggLoadingTest(SimpleTestCase): def setUp(self): self.egg_dir = "%s/eggs" % os.path.dirname(__file__) - - def tearDown(self): - apps.clear_cache() + self.addCleanup(apps.clear_cache) def test_egg1(self): """Models module can be loaded from an app in an egg""" -- cgit v1.3