mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-44022: Improve the regression test. (GH-26503)
It wasn't actually detecting the regression due to the assertion being too lenient.
This commit is contained in:
parent
adef445dc3
commit
e60ab843cb
1 changed files with 6 additions and 1 deletions
|
@ -1186,7 +1186,12 @@ class BasicTest(TestCase):
|
|||
'r\n' * 32768
|
||||
)
|
||||
resp = client.HTTPResponse(FakeSocket(body))
|
||||
self.assertRaises(client.HTTPException, resp.begin)
|
||||
with self.assertRaises(client.HTTPException) as cm:
|
||||
resp.begin()
|
||||
# We must assert more because other reasonable errors that we
|
||||
# do not want can also be HTTPException derived.
|
||||
self.assertIn('got more than ', str(cm.exception))
|
||||
self.assertIn('headers', str(cm.exception))
|
||||
|
||||
def test_overflowing_chunked_line(self):
|
||||
body = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue