1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #23919 -- Stopped inheriting from object to define new style classes.

This commit is contained in:
Simon Charette
2017-01-19 02:39:46 -05:00
committed by Claude Paroz
parent a556396339
commit cecc079168
293 changed files with 512 additions and 514 deletions

View File

@@ -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'