1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #34233 -- Used aiter() and anext().

Available since Python 3.10.
This commit is contained in:
Nick Pope
2023-01-18 12:45:07 +00:00
committed by GitHub
parent a04565845a
commit 26a395f27d
3 changed files with 3 additions and 3 deletions

View File

@@ -754,7 +754,7 @@ class StreamingHttpResponseTests(SimpleTestCase):
"serve them asynchronously. Use an asynchronous iterator instead."
)
with self.assertWarnsMessage(Warning, msg):
self.assertEqual(b"hello", await r.__aiter__().__anext__())
self.assertEqual(b"hello", await anext(aiter(r)))
class FileCloseTests(SimpleTestCase):