mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-01-13 09:19:49 +08:00
fix tutils imports
This commit is contained in:
@@ -130,7 +130,7 @@ class Data(object):
|
||||
|
||||
This function will raise ValueError if the path does not exist.
|
||||
"""
|
||||
fullpath = os.path.join(self.dirname, path)
|
||||
fullpath = os.path.join(self.dirname, '../test/', path)
|
||||
if not os.path.exists(fullpath):
|
||||
raise ValueError("dataPath: %s does not exist." % fullpath)
|
||||
return fullpath
|
||||
|
||||
@@ -2,9 +2,9 @@ import cStringIO
|
||||
import textwrap
|
||||
import binascii
|
||||
|
||||
from netlib import http, odict, tcp
|
||||
from netlib import http, odict, tcp, tutils
|
||||
from netlib.http.http1 import HTTP1Protocol
|
||||
from ... import tutils, tservers
|
||||
from ... import tservers
|
||||
|
||||
|
||||
def mock_protocol(data='', chunked=False):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import cStringIO
|
||||
from test import tutils
|
||||
from nose.tools import assert_equal
|
||||
from netlib import tcp
|
||||
|
||||
from netlib import tcp, tutils
|
||||
from netlib.http.http2.frame import *
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import OpenSSL
|
||||
|
||||
from netlib import tcp, odict, http
|
||||
from netlib import tcp, odict, http, tutils
|
||||
from netlib.http import http2
|
||||
from netlib.http.http2.frame import *
|
||||
from ... import tutils, tservers
|
||||
from ... import tservers
|
||||
|
||||
|
||||
class EchoHandler(tcp.BaseHandler):
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import binascii
|
||||
|
||||
from netlib import odict, http
|
||||
from netlib import odict, http, tutils
|
||||
from netlib.http import authentication
|
||||
from .. import tutils
|
||||
|
||||
|
||||
def test_parse_http_basic_auth():
|
||||
|
||||
@@ -3,10 +3,10 @@ import textwrap
|
||||
import binascii
|
||||
from mock import MagicMock
|
||||
|
||||
from netlib import http, odict, tcp
|
||||
from netlib import http, odict, tcp, tutils
|
||||
from netlib.http import http1
|
||||
from netlib.http.semantics import CONTENT_MISSING
|
||||
from .. import tutils, tservers
|
||||
from .. import tservers
|
||||
|
||||
def test_httperror():
|
||||
e = http.exceptions.HttpError(404, "Not found")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import os
|
||||
from netlib import certutils
|
||||
import tutils
|
||||
from netlib import certutils, tutils
|
||||
|
||||
# class TestDNTree:
|
||||
# def test_simple(self):
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from netlib import odict
|
||||
import tutils
|
||||
from netlib import odict, tutils
|
||||
|
||||
|
||||
class TestODict:
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from cStringIO import StringIO
|
||||
import socket
|
||||
from nose.plugins.skip import SkipTest
|
||||
from netlib import socks, tcp
|
||||
import tutils
|
||||
from netlib import socks, tcp, tutils
|
||||
|
||||
|
||||
def test_client_greeting():
|
||||
|
||||
@@ -10,8 +10,8 @@ import mock
|
||||
from OpenSSL import SSL
|
||||
import OpenSSL
|
||||
|
||||
from netlib import tcp, certutils
|
||||
from . import tutils, tservers
|
||||
from netlib import tcp, certutils, tutils
|
||||
from . import tservers
|
||||
|
||||
|
||||
class EchoHandler(tcp.BaseHandler):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import urlparse
|
||||
|
||||
from netlib import utils, odict
|
||||
import tutils
|
||||
from netlib import utils, odict, tutils
|
||||
|
||||
|
||||
def test_bidi():
|
||||
|
||||
@@ -3,8 +3,7 @@ import threading
|
||||
import Queue
|
||||
import cStringIO
|
||||
import OpenSSL
|
||||
from netlib import tcp, certutils
|
||||
from . import tutils
|
||||
from netlib import tcp, certutils, tutils
|
||||
|
||||
|
||||
class ServerThread(threading.Thread):
|
||||
|
||||
@@ -2,10 +2,10 @@ import os
|
||||
|
||||
from nose.tools import raises
|
||||
|
||||
from netlib import tcp, http, websockets
|
||||
from netlib import tcp, http, websockets, tutils
|
||||
from netlib.http.exceptions import *
|
||||
from netlib.http.http1 import HTTP1Protocol
|
||||
from .. import tutils, tservers
|
||||
from .. import tservers
|
||||
|
||||
|
||||
class WebSocketsEchoHandler(tcp.BaseHandler):
|
||||
|
||||
Reference in New Issue
Block a user