mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #24911 -- Made BaseManager.get_queryset() allow custom queryset args.
This commit is contained in:
committed by
Tim Graham
parent
3b81dbe844
commit
4352e865a7
@@ -597,3 +597,12 @@ class CustomManagersRegressTestCase(TestCase):
|
||||
obj = RelatedModel.objects.get(name="xyzzy")
|
||||
obj.delete()
|
||||
self.assertEqual(len(OneToOneRestrictedModel.plain_manager.all()), 0)
|
||||
|
||||
def test_queryset_with_custom_init(self):
|
||||
"""
|
||||
BaseManager.get_queryset() should use kwargs rather than args to allow
|
||||
custom kwargs (#24911).
|
||||
"""
|
||||
qs_custom = Person.custom_init_queryset_manager.all()
|
||||
qs_default = Person.objects.all()
|
||||
self.assertQuerysetEqual(qs_custom, qs_default)
|
||||
|
||||
Reference in New Issue
Block a user