diff options
| author | robot-piglet <[email protected]> | 2025-10-22 11:36:42 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-10-22 12:14:27 +0300 |
| commit | 6a490d481992dac77fa8785bb4d6e6cafea36fa3 (patch) | |
| tree | 28dac4c8ea239eedadc726b73a16514223e56389 /contrib/python/websocket-client/websocket/tests/test_websocket.py | |
| parent | d924ab94175835dc15b389ee8969ff0ddfd35930 (diff) | |
Intermediate changes
commit_hash:6bfda3fd45ff19cb21e3edc6e8b7dad337978a7e
Diffstat (limited to 'contrib/python/websocket-client/websocket/tests/test_websocket.py')
| -rw-r--r-- | contrib/python/websocket-client/websocket/tests/test_websocket.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/python/websocket-client/websocket/tests/test_websocket.py b/contrib/python/websocket-client/websocket/tests/test_websocket.py index 892312a2dbd..9e36df7c011 100644 --- a/contrib/python/websocket-client/websocket/tests/test_websocket.py +++ b/contrib/python/websocket-client/websocket/tests/test_websocket.py @@ -7,7 +7,11 @@ import unittest from base64 import decodebytes as base64decode import websocket as ws -from websocket._exceptions import WebSocketBadStatusException, WebSocketAddressException +from websocket._exceptions import ( + WebSocketBadStatusException, + WebSocketAddressException, + WebSocketException, +) from websocket._handshake import _create_sec_websocket_key from websocket._handshake import _validate as _validate_header from websocket._http import read_headers @@ -17,7 +21,7 @@ from websocket._utils import validate_utf8 test_websocket.py websocket - WebSocket client library for Python -Copyright 2024 engn33r +Copyright 2025 engn33r Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -296,7 +300,7 @@ class WebSocketTest(unittest.TestCase): def test_close(self): sock = ws.WebSocket() sock.connected = True - sock.close + sock.close() sock = ws.WebSocket() s = sock.sock = SockMock() @@ -455,7 +459,7 @@ class HandshakeTest(unittest.TestCase): self.assertRaises(ValueError, websock1.connect, "wss://api.bitfinex.com/ws/2") websock2 = ws.WebSocket(sslopt={"certfile": "myNonexistentCertFile"}) self.assertRaises( - FileNotFoundError, websock2.connect, "wss://api.bitfinex.com/ws/2" + WebSocketException, websock2.connect, "wss://api.bitfinex.com/ws/2" ) @unittest.skipUnless(TEST_WITH_INTERNET, "Internet-requiring tests are disabled") |
