summaryrefslogtreecommitdiff
path: root/tests/deprecation
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-07 12:11:46 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 21:33:28 +0100
commit2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch)
treed3e73cf44b15139aa9f1f53e398942ba64f5e190 /tests/deprecation
parent7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff)
downloaddjango-2b281cc35ed9d997614ca3c416928d7fabfef1ad.tar.gz
Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/deprecation')
-rw-r--r--tests/deprecation/tests.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py
index 34056b663b..5c2361f7a0 100644
--- a/tests/deprecation/tests.py
+++ b/tests/deprecation/tests.py
@@ -2,7 +2,6 @@ import warnings
from django.test import SimpleTestCase
from django.test.utils import reset_warning_registry
-from django.utils import six
from django.utils.deprecation import (
DeprecationInstanceCheck, RemovedInNextVersionWarning, RenameMethodsBase,
)
@@ -29,7 +28,7 @@ class RenameMethodsTests(SimpleTestCase):
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('always')
- class Manager(six.with_metaclass(RenameManagerMethods)):
+ class Manager(metaclass=RenameManagerMethods):
def old(self):
pass
self.assertEqual(len(recorded), 1)
@@ -43,7 +42,7 @@ class RenameMethodsTests(SimpleTestCase):
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('ignore')
- class Manager(six.with_metaclass(RenameManagerMethods)):
+ class Manager(metaclass=RenameManagerMethods):
def new(self):
pass
warnings.simplefilter('always')
@@ -62,7 +61,7 @@ class RenameMethodsTests(SimpleTestCase):
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('ignore')
- class Manager(six.with_metaclass(RenameManagerMethods)):
+ class Manager(metaclass=RenameManagerMethods):
def old(self):
pass
warnings.simplefilter('always')
@@ -82,7 +81,7 @@ class RenameMethodsTests(SimpleTestCase):
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('ignore')
- class Renamed(six.with_metaclass(RenameManagerMethods)):
+ class Renamed(metaclass=RenameManagerMethods):
def new(self):
pass
@@ -112,7 +111,7 @@ class RenameMethodsTests(SimpleTestCase):
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('ignore')
- class Deprecated(six.with_metaclass(RenameManagerMethods)):
+ class Deprecated(metaclass=RenameManagerMethods):
def old(self):
pass
@@ -137,7 +136,7 @@ class RenameMethodsTests(SimpleTestCase):
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('ignore')
- class Renamed(six.with_metaclass(RenameManagerMethods)):
+ class Renamed(metaclass=RenameManagerMethods):
def new(self):
pass
@@ -168,7 +167,7 @@ class RenameMethodsTests(SimpleTestCase):
class DeprecationInstanceCheckTest(SimpleTestCase):
def test_warning(self):
- class Manager(six.with_metaclass(DeprecationInstanceCheck)):
+ class Manager(metaclass=DeprecationInstanceCheck):
alternative = 'fake.path.Foo'
deprecation_warning = RemovedInNextVersionWarning