mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Unit test import cleanups.
This commit is contained in:
parent
fa11b7c9be
commit
b0f77dfefd
@ -1,5 +1,3 @@
|
||||
import socket
|
||||
from SocketServer import BaseServer
|
||||
from BaseHTTPServer import HTTPServer
|
||||
import handler
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from libmproxy import console, filt, flow
|
||||
from libmproxy import console
|
||||
from libmproxy.console import common
|
||||
import tutils
|
||||
import libpry
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from cStringIO import StringIO
|
||||
import libpry
|
||||
from libmproxy import dump, flow, proxy
|
||||
from libmproxy import dump, flow
|
||||
import tutils
|
||||
|
||||
class uStrFuncs(libpry.AutoTree):
|
||||
|
@ -1,8 +1,6 @@
|
||||
from libmproxy import encoding
|
||||
import libpry
|
||||
|
||||
import cStringIO
|
||||
|
||||
class uidentity(libpry.AutoTree):
|
||||
def test_simple(self):
|
||||
assert "string" == encoding.decode("identity", "string")
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Queue, time, textwrap
|
||||
import Queue, time
|
||||
from cStringIO import StringIO
|
||||
import email.utils
|
||||
from libmproxy import console, proxy, filt, flow, controller, utils
|
||||
from libmproxy import filt, flow, controller, utils
|
||||
import tutils
|
||||
import libpry
|
||||
|
||||
@ -472,7 +472,7 @@ class uFlowMaster(libpry.AutoTree):
|
||||
assert not fm.load_script("scripts/reqerr.py")
|
||||
req = tutils.treq()
|
||||
fm.handle_clientconnect(req.client_conn)
|
||||
f = fm.handle_request(req)
|
||||
assert fm.handle_request(req)
|
||||
|
||||
def test_script(self):
|
||||
s = flow.State()
|
||||
|
@ -1,7 +1,7 @@
|
||||
import cStringIO, time, textwrap
|
||||
import cStringIO, textwrap
|
||||
from cStringIO import StringIO
|
||||
import libpry
|
||||
from libmproxy import proxy, controller, utils, dump, flow
|
||||
from libmproxy import proxy, flow
|
||||
|
||||
|
||||
class u_read_chunked(libpry.AutoTree):
|
||||
|
@ -1,5 +1,4 @@
|
||||
import urllib, urllib2
|
||||
from libmproxy import flow
|
||||
import tutils
|
||||
|
||||
class uSanity(tutils.ProxTest):
|
||||
|
@ -1,4 +1,4 @@
|
||||
import textwrap, cStringIO, os, time, re, json
|
||||
import textwrap, os, re, json
|
||||
import libpry
|
||||
from libmproxy import utils
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import os.path, threading, Queue
|
||||
import threading, Queue
|
||||
import libpry
|
||||
from libmproxy import proxy, filt, flow, controller
|
||||
from libmproxy import proxy, flow, controller
|
||||
import serv, sslserv
|
||||
import random
|
||||
|
||||
@ -50,8 +50,8 @@ HTTPS_PORT = random.randint(30000, 40000)
|
||||
|
||||
class TestMaster(controller.Master):
|
||||
def __init__(self, port, testq):
|
||||
serv = proxy.ProxyServer(proxy.ProxyConfig("data/testkey.pem"), port)
|
||||
controller.Master.__init__(self, serv)
|
||||
s = proxy.ProxyServer(proxy.ProxyConfig("data/testkey.pem"), port)
|
||||
controller.Master.__init__(self, s)
|
||||
self.testq = testq
|
||||
self.log = []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user