aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-06-01 23:35:18 +0200
committerMaximilian Hils <git@maximilianhils.com>2017-06-02 00:01:37 +0200
commit5e17b5f62e87970d4cdb7ef1c5176f3e295eb16e (patch)
treeafc276f1e5bae9b38b84c4833351fe2086b89893 /test
parent2ba0791810cc7f843c49249c1107a9886da66f0f (diff)
downloadmitmproxy-5e17b5f62e87970d4cdb7ef1c5176f3e295eb16e.tar.gz
mitmproxy-5e17b5f62e87970d4cdb7ef1c5176f3e295eb16e.tar.bz2
mitmproxy-5e17b5f62e87970d4cdb7ef1c5176f3e295eb16e.zip
minor improvements
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/proxy/test_server.py21
-rw-r--r--test/mitmproxy/test_log.py7
2 files changed, 16 insertions, 12 deletions
diff --git a/test/mitmproxy/proxy/test_server.py b/test/mitmproxy/proxy/test_server.py
index 8381e511..bd61f600 100644
--- a/test/mitmproxy/proxy/test_server.py
+++ b/test/mitmproxy/proxy/test_server.py
@@ -1,28 +1,27 @@
import os
import socket
import time
-import pytest
from unittest import mock
-from mitmproxy.test import tutils
-from mitmproxy import options
-from mitmproxy.addons import script
-from mitmproxy.addons import proxyauth
-from mitmproxy import http
-from mitmproxy.proxy.config import HostMatcher
+import pytest
+
import mitmproxy.net.http
-from mitmproxy.net import tcp
-from mitmproxy.net import socks
from mitmproxy import certs
from mitmproxy import exceptions
+from mitmproxy import http
+from mitmproxy import options
+from mitmproxy.addons import proxyauth
+from mitmproxy.addons import script
+from mitmproxy.net import socks
+from mitmproxy.net import tcp
from mitmproxy.net.http import http1
+from mitmproxy.proxy.config import HostMatcher
+from mitmproxy.test import tutils
from pathod import pathoc
from pathod import pathod
-
from .. import tservers
from ...conftest import skip_appveyor
-
"""
Note that the choice of response code in these tests matters more than you
might think. libcurl treats a 304 response code differently from, say, a
diff --git a/test/mitmproxy/test_log.py b/test/mitmproxy/test_log.py
index 777ab4dd..cde679ed 100644
--- a/test/mitmproxy/test_log.py
+++ b/test/mitmproxy/test_log.py
@@ -1 +1,6 @@
-# TODO: write tests
+from mitmproxy import log
+
+
+def test_logentry():
+ e = log.LogEntry("foo", "info")
+ assert repr(e) == "LogEntry(foo, info)"