Kaydet (Commit) 32ade78c authored tarafından Tom's avatar Tom Kaydeden (comit) Tim Graham

Refs #28440 -- Fixed server connection closing test on macOS.

üst ad8036d7
......@@ -70,7 +70,8 @@ class LiveServerViews(LiveServerBase):
conn.request('GET', '/example_view/', headers={'Connection': 'keep-alive'})
response = conn.getresponse().read()
conn.request('GET', '/example_view/', headers={'Connection': 'close'})
with self.assertRaises(RemoteDisconnected, msg='Server did not close the connection'):
# macOS may give ConnectionResetError.
with self.assertRaises((RemoteDisconnected, ConnectionResetError)):
try:
conn.getresponse()
except ConnectionAbortedError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment