diff options
author | Claude Paroz <claude@2xlibre.net> | 2017-01-07 12:11:46 +0100 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2017-01-18 21:33:28 +0100 |
commit | 2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch) | |
tree | d3e73cf44b15139aa9f1f53e398942ba64f5e190 /tests/deprecation | |
parent | 7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff) | |
download | django-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.py | 15 |
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 |