From 86e13843c2ab510fba1de84588efe7fd03555531 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 27 Jun 2024 21:42:57 +0100 Subject: Refs #25466 -- Removed unused DeprecationInstanceCheck. Unused since ff419de263138e905dff44c5cb806310c70f32aa. --- tests/deprecation/tests.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'tests') diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py index b64691eb55..5548e90285 100644 --- a/tests/deprecation/tests.py +++ b/tests/deprecation/tests.py @@ -1,12 +1,7 @@ import warnings from django.test import SimpleTestCase -from django.utils.deprecation import ( - DeprecationInstanceCheck, - RemovedAfterNextVersionWarning, - RemovedInNextVersionWarning, - RenameMethodsBase, -) +from django.utils.deprecation import RemovedAfterNextVersionWarning, RenameMethodsBase class RenameManagerMethods(RenameMethodsBase): @@ -166,14 +161,3 @@ class RenameMethodsTests(SimpleTestCase): self.assertTrue( issubclass(RemovedAfterNextVersionWarning, PendingDeprecationWarning) ) - - -class DeprecationInstanceCheckTest(SimpleTestCase): - def test_warning(self): - class Manager(metaclass=DeprecationInstanceCheck): - alternative = "fake.path.Foo" - deprecation_warning = RemovedInNextVersionWarning - - msg = "`Manager` is deprecated, use `fake.path.Foo` instead." - with self.assertWarnsMessage(RemovedInNextVersionWarning, msg): - isinstance(object, Manager) -- cgit v1.3