From 88f3459c7d7fc44bf0e247cf7f018f8c53431e8d Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 7 Jan 2017 22:41:07 +0100 Subject: [PATCH] stronger tests, lint --- mitmproxy/tools/web/app.py | 1 - test/mitmproxy/net/http/test_response.py | 2 +- test/mitmproxy/test_web_app.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index f873b3515..05477f2db 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -17,7 +17,6 @@ from mitmproxy import http from mitmproxy import io from mitmproxy import log from mitmproxy import version -from mitmproxy.utils import strutils def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: diff --git a/test/mitmproxy/net/http/test_response.py b/test/mitmproxy/net/http/test_response.py index eae957a8f..ad2503876 100644 --- a/test/mitmproxy/net/http/test_response.py +++ b/test/mitmproxy/net/http/test_response.py @@ -6,7 +6,7 @@ from mitmproxy.net.http import Headers from mitmproxy.net.http import Response from mitmproxy.net.http.cookies import CookieAttrs from mitmproxy.test.tutils import raises, tresp -from .test_message import _test_passthrough_attr, _test_decoded_attr +from .test_message import _test_passthrough_attr class TestResponseData: diff --git a/test/mitmproxy/test_web_app.py b/test/mitmproxy/test_web_app.py index 61cf69937..7da5e4e96 100644 --- a/test/mitmproxy/test_web_app.py +++ b/test/mitmproxy/test_web_app.py @@ -129,7 +129,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): "content": "req", }, "response": { - "msg": "Not Found", + "msg": "Non-Authorisé", "code": 404, "headers": [("bar", "baz")], "content": "resp", @@ -140,7 +140,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): assert f.request.port == 123 assert f.request.headers["foo"] == "bar" assert f.request.text == "req" - assert f.response.msg == "Not Found" + assert f.response.msg == "Non-Authorisé" assert f.response.status_code == 404 assert f.response.headers["bar"] == "baz" assert f.response.text == "resp"