From 63324e0d521234baa2751674599587a52b30cfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Sun, 15 Jul 2012 22:42:07 +0200 Subject: added netlib dependency --- README.mkd | 1 + 1 file changed, 1 insertion(+) diff --git a/README.mkd b/README.mkd index c78e1bb6..f52aee6d 100644 --- a/README.mkd +++ b/README.mkd @@ -54,6 +54,7 @@ Requirements * [urwid](http://excess.org/urwid/) version 0.9.8 or newer. * [PIL](http://www.pythonware.com/products/pil/) version 1.1 or newer. * [lxml](http://lxml.de/) version 2.3 or newer. +* [netlib](http://pypi.python.org/pypi/netlib) 0.1 or newer. The following auxiliary components may be needed if you plan to hack on mitmproxy: -- cgit v1.2.3 From 013ca2a00a9487b4131176b92796915598b6f70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Sun, 15 Jul 2012 22:42:16 +0200 Subject: added testing dependencies human_curl and pathod --- README.mkd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.mkd b/README.mkd index f52aee6d..c6345dd6 100644 --- a/README.mkd +++ b/README.mkd @@ -60,7 +60,8 @@ The following auxiliary components may be needed if you plan to hack on mitmproxy: * The test suite uses the [nose](http://readthedocs.org/docs/nose/en/latest/) unit testing - framework. + framework and requires [human_curl](https://github.com/Lispython/human_curl) and + [pathod](http://pypi.python.org/pypi/pathod). * Rendering the documentation requires [countershape](http://github.com/cortesi/countershape). __mitmproxy__ is tested and developed on OSX, Linux and OpenBSD. Windows is not -- cgit v1.2.3 From da496669c2a52e06a955a067f71a70711ddb87d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Sun, 15 Jul 2012 22:42:45 +0200 Subject: removed unused imports --- test/test_console_help.py | 2 -- test/test_flow.py | 2 -- test/test_proxy.py | 5 +---- test/test_script.py | 1 - test/test_server.py | 5 +---- test/test_utils.py | 3 +-- test/tutils.py | 3 +-- 7 files changed, 4 insertions(+), 17 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..03ed9a9a 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: 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..a4257fad 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 """ 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..cfe9bffd 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: -- cgit v1.2.3 From 1a26f8215de76cb21e4c9100b4a8f766f872ac38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Sun, 15 Jul 2012 22:42:59 +0200 Subject: removed assigned but unread variables --- test/test_flow.py | 2 +- test/test_server.py | 2 +- test/tutils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_flow.py b/test/test_flow.py index 03ed9a9a..a2051eae 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -143,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_server.py b/test/test_server.py index a4257fad..38d33d90 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -33,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/tutils.py b/test/tutils.py index cfe9bffd..0e661a4b 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -50,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() -- cgit v1.2.3