mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Improved test assertion in wsgi tests
Thanks Berker Peksag for the suggestion.
This commit is contained in:
parent
b0acb1e73e
commit
5fe1c92250
@ -43,7 +43,7 @@ class WSGITest(SimpleTestCase):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
set(response_data["headers"]),
|
set(response_data["headers"]),
|
||||||
{('Content-Length', '12'), ('Content-Type', 'text/html; charset=utf-8')})
|
{('Content-Length', '12'), ('Content-Type', 'text/html; charset=utf-8')})
|
||||||
self.assertTrue(bytes(response) in [
|
self.assertIn(bytes(response), [
|
||||||
b"Content-Length: 12\r\nContent-Type: text/html; charset=utf-8\r\n\r\nHello World!",
|
b"Content-Length: 12\r\nContent-Type: text/html; charset=utf-8\r\n\r\nHello World!",
|
||||||
b"Content-Type: text/html; charset=utf-8\r\nContent-Length: 12\r\n\r\nHello World!"
|
b"Content-Type: text/html; charset=utf-8\r\nContent-Length: 12\r\n\r\nHello World!"
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user