From c38a9fcabdedb01d807257812e4f2ddc51fb1325 Mon Sep 17 00:00:00 2001 From: nanoric Date: Sun, 7 Oct 2018 04:19:48 -0400 Subject: [PATCH] =?UTF-8?q?[Mod]=20=E4=BF=AE=E6=AD=A3RestfulClient?= =?UTF-8?q?=E5=92=8CWebSocketClient=E7=9A=84=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/restful/RestfulClientTest.py | 3 ++- tests/restful/WebSocketClientTest.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/restful/RestfulClientTest.py b/tests/restful/RestfulClientTest.py index 5d3421a7..06aef8c6 100644 --- a/tests/restful/RestfulClientTest.py +++ b/tests/restful/RestfulClientTest.py @@ -12,7 +12,8 @@ class TestRestfulClient(RestfulClient): def __init__(self): urlBase = 'https://httpbin.org' - super(TestRestfulClient, self).__init__(urlBase, requestsSessionProvider) + super(TestRestfulClient, self).__init__() + self.init(urlBase) self.p = Promise() diff --git a/tests/restful/WebSocketClientTest.py b/tests/restful/WebSocketClientTest.py index 5006265c..79b47510 100644 --- a/tests/restful/WebSocketClientTest.py +++ b/tests/restful/WebSocketClientTest.py @@ -9,8 +9,9 @@ from vnpy.restful.WebSocketClient import WebsocketClient class TestWebsocketClient(WebsocketClient): def __init__(self): - urlBase = 'wss://echo.websocket.org' - super(TestWebsocketClient, self).__init__(urlBase) + host = 'wss://echo.websocket.org' + super(TestWebsocketClient, self).__init__() + self.init(host) self.p = Promise() def onMessage(self, packet):