1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #24141 -- Added QuerySet.contains().

This commit is contained in:
Johan Schiff
2020-06-09 11:23:31 +02:00
committed by Mariusz Felisiak
parent 286fb73b69
commit d01709aae2
7 changed files with 132 additions and 18 deletions

View File

@@ -404,6 +404,12 @@ class QuerySetSetOperationTests(TestCase):
msg % (operation, combinator),
):
getattr(getattr(qs, combinator)(qs), operation)()
with self.assertRaisesMessage(
NotSupportedError,
msg % ('contains', combinator),
):
obj = Number.objects.first()
getattr(qs, combinator)(qs).contains(obj)
def test_get_with_filters_unsupported_on_combined_qs(self):
qs = Number.objects.all()