mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #25361 -- Added test for pickling queryset of abstract-inherited models with Meta.ordering.
Fixed in 67cf5efa31.
This commit is contained in:
committed by
Mariusz Felisiak
parent
9285926295
commit
200cd8803d
@@ -5,7 +5,7 @@ from django.db import models
|
||||
from django.test import TestCase
|
||||
from django.utils.version import get_version
|
||||
|
||||
from .models import Container, Event, Group, Happening, M2MModel
|
||||
from .models import Container, Event, Group, Happening, M2MModel, MyEvent
|
||||
|
||||
|
||||
class PickleabilityTestCase(TestCase):
|
||||
@@ -238,6 +238,12 @@ class PickleabilityTestCase(TestCase):
|
||||
with self.assertRaisesMessage(RuntimeWarning, msg):
|
||||
pickle.loads(pickle.dumps(qs))
|
||||
|
||||
def test_order_by_model_with_abstract_inheritance_and_meta_ordering(self):
|
||||
group = Group.objects.create(name='test')
|
||||
event = MyEvent.objects.create(title='test event', group=group)
|
||||
event.edition_set.create()
|
||||
self.assert_pickles(event.edition_set.order_by('event'))
|
||||
|
||||
|
||||
class InLookupTests(TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user