mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Used yield from.
This commit is contained in:
committed by
Tim Graham
parent
4cffa9a1ff
commit
3dcc351691
@@ -787,8 +787,7 @@ class Queries1Tests(TestCase):
|
||||
n_obj = Note.objects.all()[0]
|
||||
|
||||
def g():
|
||||
for i in [n_obj.pk]:
|
||||
yield i
|
||||
yield n_obj.pk
|
||||
self.assertQuerysetEqual(Note.objects.filter(pk__in=f()), [])
|
||||
self.assertEqual(list(Note.objects.filter(pk__in=g())), [n_obj])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user