From 1b487539b1f3ea183eaed26ae756d0cc7d3ec3ea Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sun, 24 Jan 2016 23:24:59 +0100 Subject: [PATCH] move tservers to netlib module --- {test => netlib}/tservers.py | 2 ++ test/http/http2/test_protocol.py | 3 +-- test/test_tcp.py | 3 +-- test/websockets/test_websockets.py | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) rename {test => netlib}/tservers.py (99%) diff --git a/test/tservers.py b/netlib/tservers.py similarity index 99% rename from test/tservers.py rename to netlib/tservers.py index c47d6a5f7..44ef80636 100644 --- a/test/tservers.py +++ b/netlib/tservers.py @@ -1,8 +1,10 @@ from __future__ import (absolute_import, print_function, division) + import threading from six.moves import queue from io import StringIO import OpenSSL + from netlib import tcp from netlib import tutils diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py index 6bda96f58..0beec9506 100644 --- a/test/http/http2/test_protocol.py +++ b/test/http/http2/test_protocol.py @@ -1,12 +1,11 @@ import OpenSSL import mock -from netlib import tcp, http, tutils +from netlib import tcp, http, tutils, tservers from netlib.exceptions import TcpDisconnect from netlib.http import Headers from netlib.http.http2.connections import HTTP2Protocol, TCPHandler from netlib.http.http2.frame import * -from ... import tservers class TestTCPHandlerWrapper: def test_wrapped(self): diff --git a/test/test_tcp.py b/test/test_tcp.py index 68d54b78d..738fb2eb2 100644 --- a/test/test_tcp.py +++ b/test/test_tcp.py @@ -10,8 +10,7 @@ import mock from OpenSSL import SSL import OpenSSL -from netlib import tcp, certutils, tutils -from . import tservers +from netlib import tcp, certutils, tutils, tservers from netlib.exceptions import InvalidCertificateException, TcpReadIncomplete, TlsException, \ TcpTimeout, TcpDisconnect, TcpException diff --git a/test/websockets/test_websockets.py b/test/websockets/test_websockets.py index 9a1e5d3d2..d53f0d83e 100644 --- a/test/websockets/test_websockets.py +++ b/test/websockets/test_websockets.py @@ -2,12 +2,11 @@ import os from netlib.http.http1 import read_response, read_request -from netlib import tcp, tutils, websockets, http +from netlib import tcp, websockets, http, tutils, tservers from netlib.http import status_codes from netlib.tutils import treq from netlib.exceptions import * -from .. import tservers class WebSocketsEchoHandler(tcp.BaseHandler):