diff options
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/introspection/tests.py | 4 | ||||
| -rw-r--r-- | tests/regressiontests/model_forms_regress/tests.py | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py index 06736a68cb..e7cf7b9e1a 100644 --- a/tests/regressiontests/introspection/tests.py +++ b/tests/regressiontests/introspection/tests.py @@ -4,6 +4,7 @@ from functools import update_wrapper from django.db import connection from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature +from django.utils import six from .models import Reporter, Article @@ -35,8 +36,7 @@ class IgnoreNotimplementedError(type): attrs[k] = ignore_not_implemented(v) return type.__new__(cls, name, bases, attrs) -class IntrospectionTests(TestCase): - __metaclass__ = IgnoreNotimplementedError +class IntrospectionTests(six.with_metaclass(IgnoreNotimplementedError, TestCase)): def test_table_names(self): tl = connection.introspection.table_names() diff --git a/tests/regressiontests/model_forms_regress/tests.py b/tests/regressiontests/model_forms_regress/tests.py index 3cb129f84e..90c907f2a6 100644 --- a/tests/regressiontests/model_forms_regress/tests.py +++ b/tests/regressiontests/model_forms_regress/tests.py @@ -485,9 +485,8 @@ class CustomMetaclass(ModelFormMetaclass): new.base_fields = {} return new -class CustomMetaclassForm(forms.ModelForm): - __metaclass__ = CustomMetaclass - +class CustomMetaclassForm(six.with_metaclass(CustomMetaclass, forms.ModelForm)): + pass class CustomMetaclassTestCase(TestCase): def test_modelform_factory_metaclass(self): |
