mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Changed '%s' % value pattern to str(value).
This commit is contained in:
committed by
Mariusz Felisiak
parent
7668f9bce9
commit
8f10ceaa90
@@ -145,7 +145,7 @@ class HttpResponseTests(SimpleTestCase):
|
||||
self.assertEqual(r.content, content.encode(UTF8))
|
||||
|
||||
def test_generator_cache(self):
|
||||
generator = ("{}".format(i) for i in range(10))
|
||||
generator = (str(i) for i in range(10))
|
||||
response = HttpResponse(content=generator)
|
||||
self.assertEqual(response.content, b'0123456789')
|
||||
with self.assertRaises(StopIteration):
|
||||
|
||||
Reference in New Issue
Block a user