mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
This commit is contained in:
@@ -169,7 +169,8 @@ class DeferTests(AssertionMixin, TestCase):
|
||||
# You can retrieve a single column on a base class with no fields
|
||||
Child.objects.create(name="c1", value="foo", related=self.s1)
|
||||
obj = Child.objects.only("name").get(name="c1")
|
||||
# on an inherited model, its PK is also fetched, hence '3' deferred fields.
|
||||
# on an inherited model, its PK is also fetched, hence '3' deferred
|
||||
# fields.
|
||||
self.assert_delayed(obj, 3)
|
||||
self.assertEqual(obj.name, "c1")
|
||||
self.assertEqual(obj.value, "foo")
|
||||
@@ -215,7 +216,8 @@ class BigChildDeferTests(AssertionMixin, TestCase):
|
||||
def test_only_baseclass_when_subclass_has_added_field(self):
|
||||
# You can retrieve a single field on a baseclass
|
||||
obj = BigChild.objects.only("name").get(name="b1")
|
||||
# when inherited model, its PK is also fetched, hence '4' deferred fields.
|
||||
# when inherited model, its PK is also fetched, hence '4' deferred
|
||||
# fields.
|
||||
self.assert_delayed(obj, 4)
|
||||
self.assertEqual(obj.name, "b1")
|
||||
self.assertEqual(obj.value, "foo")
|
||||
|
||||
Reference in New Issue
Block a user