Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adef445 commit e60ab84Copy full SHA for e60ab84
1 file changed
Lib/test/test_httplib.py
@@ -1186,7 +1186,12 @@ def test_overflowing_header_limit_after_100(self):
1186
'r\n' * 32768
1187
)
1188
resp = client.HTTPResponse(FakeSocket(body))
1189
- self.assertRaises(client.HTTPException, resp.begin)
+ with self.assertRaises(client.HTTPException) as cm:
1190
+ resp.begin()
1191
+ # We must assert more because other reasonable errors that we
1192
+ # do not want can also be HTTPException derived.
1193
+ self.assertIn('got more than ', str(cm.exception))
1194
+ self.assertIn('headers', str(cm.exception))
1195
1196
def test_overflowing_chunked_line(self):
1197
body = (
0 commit comments