mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Complemented pickle test for ValuesQuerySet with related field
Refs #14515.
This commit is contained in:
parent
7ce9644d93
commit
fae551d765
2 changed files with 6 additions and 0 deletions
|
@ -100,6 +100,11 @@ class PickleabilityTestCase(TestCase):
|
|||
self.assert_pickles(Happening.objects.values('name'))
|
||||
self.assert_pickles(Happening.objects.values('name').dates('when', 'year'))
|
||||
|
||||
# ValuesQuerySet with related field (#14515)
|
||||
self.assert_pickles(
|
||||
Event.objects.select_related('group').order_by('title').values_list('title', 'group__name')
|
||||
)
|
||||
|
||||
def test_pickle_prefetch_related_idempotence(self):
|
||||
g = Group.objects.create(name='foo')
|
||||
groups = Group.objects.prefetch_related('event_set')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue