[Mod] 修正RestfulClient和WebSocketClient的单元测试

This commit is contained in:
nanoric 2018-10-07 04:19:48 -04:00
parent 0236fcb864
commit c38a9fcabd
2 changed files with 5 additions and 3 deletions

View File

@ -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()

View File

@ -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):