diff options
| author | Tom <tom@tomforb.es> | 2017-10-12 16:12:18 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-10-13 13:46:21 -0400 |
| commit | 73d025a04215a3738867fbe1f8b0ce6557a3ee03 (patch) | |
| tree | 987fbc7f74ab310bd1390a6fe5401de537e4c6a7 | |
| parent | 8b42a18b2d7bbd9e94ee80458a1cfcbb544e588c (diff) | |
[2.0.x] Refs #28440 -- Fixed server connection closing test on macOS.
Backport of 32ade78c55edd6231544607a841a9e7efdcbdb5b from master
| -rw-r--r-- | tests/servers/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py index ea64c246e2..a5667f0b19 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -75,7 +75,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: |
