aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_console_help.py2
-rw-r--r--test/test_flow.py4
-rw-r--r--test/test_proxy.py5
-rw-r--r--test/test_script.py1
-rw-r--r--test/test_server.py7
-rw-r--r--test/test_utils.py3
-rw-r--r--test/tutils.py5
7 files changed, 7 insertions, 20 deletions
diff --git a/test/test_console_help.py b/test/test_console_help.py
index c9ef7228..98e202ad 100644
--- a/test/test_console_help.py
+++ b/test/test_console_help.py
@@ -1,6 +1,4 @@
-import sys
import libmproxy.console.help as help
-from libmproxy import utils, flow, encoding
class DummyMaster:
def make_view(self):
diff --git a/test/test_flow.py b/test/test_flow.py
index 99df9ed0..a2051eae 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -2,9 +2,7 @@ import Queue, time, os.path
from cStringIO import StringIO
import email.utils
from libmproxy import filt, flow, controller, utils, tnetstring
-from netlib import certutils
import tutils
-import libpry
class TestStickyCookieState:
@@ -145,7 +143,7 @@ class TestServerPlaybackState:
s = flow.ServerPlaybackState(None, [r, r2], False, True)
assert s.count() == 2
- n = s.next_flow(r)
+ s.next_flow(r)
assert s.count() == 2
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 10587168..e137c687 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -1,7 +1,4 @@
-import cStringIO, textwrap
-from cStringIO import StringIO
-import libpry
-from libmproxy import proxy, flow
+from libmproxy import proxy
import tutils
diff --git a/test/test_script.py b/test/test_script.py
index 88f32ddf..407c9b4b 100644
--- a/test/test_script.py
+++ b/test/test_script.py
@@ -1,4 +1,3 @@
-import os
from libmproxy import script, flow
import tutils
diff --git a/test/test_server.py b/test/test_server.py
index 86dc0a4a..38d33d90 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -1,7 +1,4 @@
-import urllib, urllib2, unittest
-import time
-import libpathod.test, requests
-from netlib import tcp, http
+from netlib import tcp
import tutils
"""
@@ -36,7 +33,7 @@ class SanityMixin:
# Port error
l.request.port = 1
- rt = self.master.replay_request(l, block=True)
+ self.master.replay_request(l, block=True)
assert l.error
diff --git a/test/test_utils.py b/test/test_utils.py
index e23d919f..49312a4b 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -1,6 +1,5 @@
-import textwrap, re, json
+import json
from libmproxy import utils
-from nose.tools import assert_raises
import tutils
utils.CERT_SLEEP_TIME = 0
diff --git a/test/tutils.py b/test/tutils.py
index a35dc4d4..0e661a4b 100644
--- a/test/tutils.py
+++ b/test/tutils.py
@@ -1,11 +1,10 @@
-import threading, Queue, time
+import threading, Queue
import os, shutil, tempfile
from contextlib import contextmanager
from libmproxy import proxy, flow, controller, utils
from netlib import certutils
import human_curl as hurl
import libpathod.test
-import random
def treq(conn=None):
if not conn:
@@ -51,7 +50,7 @@ class TestMaster(flow.FlowMaster):
self.testq = testq
def handle(self, m):
- f = flow.FlowMaster.handle(self, m)
+ flow.FlowMaster.handle(self, m)
m._ack()