summaryrefslogtreecommitdiff
path: root/tests/admin_utils
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2017-01-19 02:39:46 -0500
committerClaude Paroz <claude@2xlibre.net>2017-01-19 08:39:46 +0100
commitcecc079168e8669138728d31611ff3a1e7eb3a9f (patch)
tree2415083d44f84c6f206930fc689a8c0e50a98caa /tests/admin_utils
parenta5563963397aeee30c32e3c1dab31bfe453ca89f (diff)
downloaddjango-cecc079168e8669138728d31611ff3a1e7eb3a9f.tar.gz
Refs #23919 -- Stopped inheriting from object to define new style classes.
Diffstat (limited to 'tests/admin_utils')
-rw-r--r--tests/admin_utils/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/admin_utils/tests.py b/tests/admin_utils/tests.py
index 245334df4d..1c14615e71 100644
--- a/tests/admin_utils/tests.py
+++ b/tests/admin_utils/tests.py
@@ -105,7 +105,7 @@ class UtilsTests(SimpleTestCase):
SIMPLE_FUNCTION = 'function'
INSTANCE_ATTRIBUTE = 'attr'
- class MockModelAdmin(object):
+ class MockModelAdmin:
def get_admin_value(self, obj):
return ADMIN_METHOD
@@ -259,7 +259,7 @@ class UtilsTests(SimpleTestCase):
)
self.assertEqual(label_for_field('site_id', Article), 'Site id')
- class MockModelAdmin(object):
+ class MockModelAdmin:
def test_from_model(self, obj):
return "nothing"
test_from_model.short_description = "not Really the Model"
@@ -276,7 +276,7 @@ class UtilsTests(SimpleTestCase):
def test_label_for_property(self):
# NOTE: cannot use @property decorator, because of
# AttributeError: 'property' object has no attribute 'short_description'
- class MockModelAdmin(object):
+ class MockModelAdmin:
def my_property(self):
return "this if from property"
my_property.short_description = 'property short description'