diff options
| author | Simon Charette <charettes@users.noreply.github.com> | 2017-01-19 02:39:46 -0500 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-19 08:39:46 +0100 |
| commit | cecc079168e8669138728d31611ff3a1e7eb3a9f (patch) | |
| tree | 2415083d44f84c6f206930fc689a8c0e50a98caa /tests/modeladmin | |
| parent | a5563963397aeee30c32e3c1dab31bfe453ca89f (diff) | |
Refs #23919 -- Stopped inheriting from object to define new style classes.
Diffstat (limited to 'tests/modeladmin')
| -rw-r--r-- | tests/modeladmin/test_checks.py | 12 | ||||
| -rw-r--r-- | tests/modeladmin/tests.py | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/modeladmin/test_checks.py b/tests/modeladmin/test_checks.py index 93b35ecf56..c90ed64958 100644 --- a/tests/modeladmin/test_checks.py +++ b/tests/modeladmin/test_checks.py @@ -198,7 +198,7 @@ class FieldsCheckTests(CheckTestCase): class FormCheckTests(CheckTestCase): def test_invalid_type(self): - class FakeForm(object): + class FakeForm: pass class TestModelAdmin(ModelAdmin): @@ -578,7 +578,7 @@ class ListFilterTests(CheckTestCase): ) def test_not_filter(self): - class RandomClass(object): + class RandomClass: pass class TestModelAdmin(ModelAdmin): @@ -590,7 +590,7 @@ class ListFilterTests(CheckTestCase): 'admin.E113') def test_not_filter_again(self): - class RandomClass(object): + class RandomClass: pass class TestModelAdmin(ModelAdmin): @@ -869,7 +869,7 @@ class InlinesCheckTests(CheckTestCase): ) def test_not_model_admin(self): - class ValidationTestInline(object): + class ValidationTestInline: pass class TestModelAdmin(ModelAdmin): @@ -894,7 +894,7 @@ class InlinesCheckTests(CheckTestCase): 'admin.E105') def test_invalid_model_type(self): - class SomethingBad(object): + class SomethingBad: pass class ValidationTestInline(TabularInline): @@ -1034,7 +1034,7 @@ class MinNumCheckTests(CheckTestCase): class FormsetCheckTests(CheckTestCase): def test_invalid_type(self): - class FakeFormSet(object): + class FakeFormSet: pass class ValidationTestInline(TabularInline): diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 12ca86ff1a..1cded986fa 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -14,11 +14,11 @@ from django.test import SimpleTestCase, TestCase from .models import Band, Concert -class MockRequest(object): +class MockRequest: pass -class MockSuperUser(object): +class MockSuperUser: def has_perm(self, perm): return True @@ -589,7 +589,7 @@ class ModelAdminTests(TestCase): class ModelAdminPermissionTests(SimpleTestCase): - class MockUser(object): + class MockUser: def has_module_perms(self, app_label): if app_label == "modeladmin": return True |
