diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-28 12:12:37 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-28 12:12:37 +1200 |
commit | 41af65a1c478825d4df6239b33fbcb971dcf1df8 (patch) | |
tree | 9830657189938900adad330beba0478f0d0761c2 /test/test_wsgi.py | |
parent | 5265b289575d3935e8af29b5c27c963832efc8ad (diff) | |
parent | 80378306960379f12aca72309dc47437cd1a825c (diff) | |
download | mitmproxy-41af65a1c478825d4df6239b33fbcb971dcf1df8.tar.gz mitmproxy-41af65a1c478825d4df6239b33fbcb971dcf1df8.tar.bz2 mitmproxy-41af65a1c478825d4df6239b33fbcb971dcf1df8.zip |
Merge branch 'Kriechi-cleanup'
Diffstat (limited to 'test/test_wsgi.py')
-rw-r--r-- | test/test_wsgi.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_wsgi.py b/test/test_wsgi.py index 1c8c5263..41572d49 100644 --- a/test/test_wsgi.py +++ b/test/test_wsgi.py @@ -1,4 +1,5 @@ -import cStringIO, sys +import cStringIO +import sys from netlib import wsgi, odict @@ -10,6 +11,7 @@ def tflow(): class TestApp: + def __init__(self): self.called = False @@ -22,6 +24,7 @@ class TestApp: class TestWSGI: + def test_make_environ(self): w = wsgi.WSGIAdaptor(None, "foo", 80, "version") tf = tflow() @@ -53,7 +56,7 @@ class TestWSGI: f.request.host = "foo" f.request.port = 80 wfile = cStringIO.StringIO() - err = w.serve(f, wfile) + w.serve(f, wfile) return wfile.getvalue() def test_serve_empty_body(self): @@ -69,7 +72,7 @@ class TestWSGI: try: raise ValueError("foo") except: - ei = sys.exc_info() + sys.exc_info() status = '200 OK' response_headers = [('Content-type', 'text/plain')] start_response(status, response_headers) |