diff --git a/tests/restful/RestfulClientTest.py b/tests/restful/RestfulClientTest.py index 06aef8c6..4a35072e 100644 --- a/tests/restful/RestfulClientTest.py +++ b/tests/restful/RestfulClientTest.py @@ -5,14 +5,14 @@ import traceback import unittest from Promise import Promise -from vnpy.restful.RestfulClient import RestfulClient, requestsSessionProvider +from vnpy.network.HttpClient import HttpClient, requestsSessionProvider -class TestRestfulClient(RestfulClient): +class TestHttpClient(HttpClient): def __init__(self): urlBase = 'https://httpbin.org' - super(TestRestfulClient, self).__init__() + super(TestHttpClient, self).__init__() self.init(urlBase) self.p = Promise() @@ -29,7 +29,7 @@ class TestRestfulClient(RestfulClient): class RestfulClientTest(unittest.TestCase): def setUp(self): - self.c = TestRestfulClient() + self.c = TestHttpClient() self.c.start() def tearDown(self): diff --git a/tests/restful/WebSocketClientTest.py b/tests/restful/WebSocketClientTest.py index 79b47510..4337a3c0 100644 --- a/tests/restful/WebSocketClientTest.py +++ b/tests/restful/WebSocketClientTest.py @@ -3,7 +3,7 @@ import json import unittest from Promise import Promise -from vnpy.restful.WebSocketClient import WebsocketClient +from vnpy.network.WebSocketClient import WebsocketClient class TestWebsocketClient(WebsocketClient): diff --git a/vnpy/restful/RestfulClient.py b/vnpy/network/HttpClient.py similarity index 97% rename from vnpy/restful/RestfulClient.py rename to vnpy/network/HttpClient.py index 5a3cc3aa..660c5f24 100644 --- a/vnpy/restful/RestfulClient.py +++ b/vnpy/network/HttpClient.py @@ -51,7 +51,11 @@ class Request(object): ######################################################################## -class RestfulClient(object): +class HttpClient(object): + """ + HTTP 客户端。目前是为了对接各种RESTFulAPI而设计的。 + 一般情况下应该 + """ #---------------------------------------------------------------------- def __init__(self): diff --git a/vnpy/restful/WebSocketClient.py b/vnpy/network/WebSocketClient.py similarity index 100% rename from vnpy/restful/WebSocketClient.py rename to vnpy/network/WebSocketClient.py diff --git a/vnpy/restful/__init__.py b/vnpy/network/__init__.py similarity index 100% rename from vnpy/restful/__init__.py rename to vnpy/network/__init__.py