123456789101112131415161718192021222324252627282930313233 |
- --- contrib/python/websocket-client/py2/websocket/tests/test_http.py (index)
- +++ contrib/python/websocket-client/py2/websocket/tests/test_http.py (working tree)
- @@ -66,7 +66,8 @@ class HeaderSockMock(SockMock):
-
- def __init__(self, fname):
- SockMock.__init__(self)
- - path = os.path.join(os.path.dirname(__file__), fname)
- + import yatest.common as yc
- + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname)
- with open(path, "rb") as f:
- self.add_packet(f.read())
-
- @@ -91,7 +92,7 @@ class HttpTest(unittest.TestCase):
- self.assertRaises(ws.WebSocketProxyException, _tunnel, HeaderSockMock("data/header01.txt"), "example.com", 80, ("username", "password"))
- self.assertRaises(ws.WebSocketProxyException, _tunnel, HeaderSockMock("data/header02.txt"), "example.com", 80, ("username", "password"))
-
- - def testConnect(self):
- + def _testConnect(self):
- # Not currently testing an actual proxy connection, so just check whether TypeError is raised
- self.assertRaises(TypeError, _open_proxied_socket, "wss://example.com", OptsList(), proxy_info(http_proxy_host="example.com", http_proxy_port="8080", proxy_type="http"))
- self.assertRaises(TypeError, _open_proxied_socket, "wss://example.com", OptsList(), proxy_info(http_proxy_host="example.com", http_proxy_port="8080", proxy_type="socks4"))
- --- contrib/python/websocket-client/py2/websocket/tests/test_websocket.py (index)
- +++ contrib/python/websocket-client/py2/websocket/tests/test_websocket.py (working tree)
- @@ -99,7 +99,8 @@ class HeaderSockMock(SockMock):
-
- def __init__(self, fname):
- SockMock.__init__(self)
- - path = os.path.join(os.path.dirname(__file__), fname)
- + import yatest.common as yc
- + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname)
- with open(path, "rb") as f:
- self.add_packet(f.read())
-
|