From 0d0c2c788df4b60e951e6fcc13b479de8cec22c1 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 1 Sep 2016 10:06:51 +0200 Subject: [PATCH] cleanup tests --- test/mitmproxy/protocol/__init__.py | 0 .../{test_protocol_http1.py => protocol/test_http1.py} | 4 +++- .../{test_protocol_http2.py => protocol/test_http2.py} | 4 ++-- test/mitmproxy/protocol/test_websockets.py | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 test/mitmproxy/protocol/__init__.py rename test/mitmproxy/{test_protocol_http1.py => protocol/test_http1.py} (94%) rename test/mitmproxy/{test_protocol_http2.py => protocol/test_http2.py} (99%) diff --git a/test/mitmproxy/protocol/__init__.py b/test/mitmproxy/protocol/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/test/mitmproxy/test_protocol_http1.py b/test/mitmproxy/protocol/test_http1.py similarity index 94% rename from test/mitmproxy/test_protocol_http1.py rename to test/mitmproxy/protocol/test_http1.py index cf7bd5983..7d04c56b7 100644 --- a/test/mitmproxy/test_protocol_http1.py +++ b/test/mitmproxy/protocol/test_http1.py @@ -1,7 +1,9 @@ +from __future__ import (absolute_import, print_function, division) + from netlib.http import http1 from netlib.tcp import TCPClient from netlib.tutils import treq -from . import tutils, tservers +from .. import tutils, tservers class TestHTTPFlow(object): diff --git a/test/mitmproxy/test_protocol_http2.py b/test/mitmproxy/protocol/test_http2.py similarity index 99% rename from test/mitmproxy/test_protocol_http2.py rename to test/mitmproxy/protocol/test_http2.py index 873c89c37..1eabebf11 100644 --- a/test/mitmproxy/test_protocol_http2.py +++ b/test/mitmproxy/protocol/test_http2.py @@ -13,11 +13,11 @@ from mitmproxy import options from mitmproxy.proxy.config import ProxyConfig import netlib -from ..netlib import tservers as netlib_tservers +from ...netlib import tservers as netlib_tservers from netlib.exceptions import HttpException from netlib.http.http2 import framereader -from . import tservers +from .. import tservers import logging logging.getLogger("hyper.packages.hpack.hpack").setLevel(logging.WARNING) diff --git a/test/mitmproxy/protocol/test_websockets.py b/test/mitmproxy/protocol/test_websockets.py index cc478c0b4..e7e2684fb 100644 --- a/test/mitmproxy/protocol/test_websockets.py +++ b/test/mitmproxy/protocol/test_websockets.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import, print_function, division + import pytest import os import tempfile