diff options
| author | Adam Johnson <me@adamj.eu> | 2024-06-27 21:42:57 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-07-11 09:40:07 +0200 |
| commit | 86e13843c2ab510fba1de84588efe7fd03555531 (patch) | |
| tree | b70445682c6af0dd3b73507e63709d0a525c9811 /tests | |
| parent | b2fec1f08df316e26ff2c756ff23a9605746a864 (diff) | |
Refs #25466 -- Removed unused DeprecationInstanceCheck.
Unused since ff419de263138e905dff44c5cb806310c70f32aa.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/deprecation/tests.py | 18 |
1 files changed, 1 insertions, 17 deletions
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) |
