aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-09-24 21:01:48 -0700
committerGitHub <noreply@github.com>2016-09-24 21:01:48 -0700
commiteeec17902fdcd7de766dc79ed6a2e3a73ad4ce3d (patch)
treee5bf3bfede02873eed266a76bc42039f80e30295
parentde65aebfdf011f1cf68c554ed79326621c328c10 (diff)
downloadmitmproxy-eeec17902fdcd7de766dc79ed6a2e3a73ad4ce3d.tar.gz
mitmproxy-eeec17902fdcd7de766dc79ed6a2e3a73ad4ce3d.tar.bz2
mitmproxy-eeec17902fdcd7de766dc79ed6a2e3a73ad4ce3d.zip
update dependencies, minor fixes (#1577)
-rw-r--r--mitmproxy/dump.py15
-rw-r--r--setup.cfg2
-rw-r--r--setup.py6
-rw-r--r--test/mitmproxy/test_dump.py4
4 files changed, 14 insertions, 13 deletions
diff --git a/mitmproxy/dump.py b/mitmproxy/dump.py
index 3d725ca1..6bed8fcc 100644
--- a/mitmproxy/dump.py
+++ b/mitmproxy/dump.py
@@ -1,7 +1,5 @@
from __future__ import absolute_import, print_function, division
-import sys
-
from typing import Optional # noqa
import typing # noqa
@@ -49,12 +47,17 @@ class DumpMaster(flow.FlowMaster):
self.set_stream_large_bodies(options.stream_large_bodies)
if not self.options.no_server and server:
- print("Proxy server listening at http://{}".format(server.address))
+ self.add_log(
+ "Proxy server listening at http://{}".format(server.address),
+ "info"
+ )
if self.server and self.options.http2 and not tcp.HAS_ALPN: # pragma: no cover
- print("ALPN support missing (OpenSSL 1.0.2+ required)!\n"
- "HTTP/2 is disabled. Use --no-http2 to silence this warning.",
- file=sys.stderr)
+ self.add_log(
+ "ALPN support missing (OpenSSL 1.0.2+ required)!\n"
+ "HTTP/2 is disabled. Use --no-http2 to silence this warning.",
+ "error"
+ )
if options.rfile:
try:
diff --git a/setup.cfg b/setup.cfg
index 7cbbf81b..47fe119a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ ignore = E251,C901
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*
builtins = file,open,basestring,xrange,unicode,long,cmp
-[pytest]
+[tool:pytest]
testpaths = test
addopts = --capture=no --color=yes
diff --git a/setup.py b/setup.py
index 9f75ca15..eec05148 100644
--- a/setup.py
+++ b/setup.py
@@ -64,13 +64,13 @@ setup(
"blinker>=1.4, <1.5",
"click>=6.2, <7.0",
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
- "configargparse>=0.10, <0.11",
+ "configargparse>=0.10, <0.12",
"construct>=2.5.2, <2.6",
"cryptography>=1.3, <1.6",
"cssutils>=1.0.1, <1.1",
"Flask>=0.10.1, <0.12",
"h2>=2.4.1, <3",
- "html2text>=2016.1.8, <=2016.5.29",
+ "html2text>=2016.1.8, <=2016.9.19",
"hyperframe>=4.0.1, <5",
"jsbeautifier>=1.6.3, <1.7",
"lxml>=3.5.0, <=3.6.0", # no wheels for 3.6.1 yet.
@@ -103,7 +103,7 @@ setup(
'dev': [
"tox>=2.3, <3",
"mock>=2.0, <2.1",
- "pytest>=2.8.7, <3",
+ "pytest>=3, <3.1",
"pytest-cov>=2.2.1, <3",
"pytest-timeout>=1.0.0, <2",
"pytest-xdist>=1.14, <2",
diff --git a/test/mitmproxy/test_dump.py b/test/mitmproxy/test_dump.py
index 06f39e9d..644a3d54 100644
--- a/test/mitmproxy/test_dump.py
+++ b/test/mitmproxy/test_dump.py
@@ -3,7 +3,6 @@ from six.moves import cStringIO as StringIO
from mitmproxy import dump, flow, exceptions
from . import tutils, mastertest
-import mock
class TestDumpMaster(mastertest.MasterTest):
@@ -102,8 +101,7 @@ class TestDumpMaster(mastertest.MasterTest):
def test_app(self):
o = dump.Options(app=True)
- s = mock.MagicMock()
- m = dump.DumpMaster(s, o)
+ m = dump.DumpMaster(None, o)
assert len(m.apps.apps) == 1
def test_replacements(self):