mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ from django.test import TestCase
|
||||
|
||||
from .models import (
|
||||
BigChild, Child, ChildProxy, Primary, RefreshPrimaryProxy, Secondary,
|
||||
ShadowChild,
|
||||
)
|
||||
|
||||
|
||||
@@ -165,6 +166,11 @@ class DeferTests(AssertionMixin, TestCase):
|
||||
self.assertEqual(obj.name, "c1")
|
||||
self.assertEqual(obj.value, "foo")
|
||||
|
||||
def test_defer_of_overridden_scalar(self):
|
||||
ShadowChild.objects.create()
|
||||
obj = ShadowChild.objects.defer('name').get()
|
||||
self.assertEqual(obj.name, 'adonis')
|
||||
|
||||
|
||||
class BigChildDeferTests(AssertionMixin, TestCase):
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user