diff options
author | Sam Cleveland <sam@zombisoft.com> | 2015-11-14 13:42:43 -0600 |
---|---|---|
committer | Sam Cleveland <sam@zombisoft.com> | 2015-11-14 13:42:43 -0600 |
commit | ce02874e2a7c5dacd12e58652e9665857bd46c62 (patch) | |
tree | 0c4b95a432edb7d0e241cadd811c5d1f472e498a /test/test_wsgi.py | |
parent | 2bd7bcb3711a20b6a166710f2c7d989d8ae5fcc8 (diff) | |
download | mitmproxy-ce02874e2a7c5dacd12e58652e9665857bd46c62.tar.gz mitmproxy-ce02874e2a7c5dacd12e58652e9665857bd46c62.tar.bz2 mitmproxy-ce02874e2a7c5dacd12e58652e9665857bd46c62.zip |
Fixing test_wsgi to remove py.test warnings
Renamed TestApp class to ExampleApp to prevent py.test from trying to
collect it as a test.
Diffstat (limited to 'test/test_wsgi.py')
-rw-r--r-- | test/test_wsgi.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_wsgi.py b/test/test_wsgi.py index ec6e8c63..8c782b27 100644 --- a/test/test_wsgi.py +++ b/test/test_wsgi.py @@ -10,8 +10,10 @@ def tflow(): return wsgi.Flow(("127.0.0.1", 8888), req) -class TestApp: - +class ExampleApp: + + def __init__(self): + self.called = False def __call__(self, environ, start_response): self.called = True @@ -33,7 +35,7 @@ class TestWSGI: assert r["QUERY_STRING"] == "bar=voing" def test_serve(self): - ta = TestApp() + ta = ExampleApp() w = wsgi.WSGIAdaptor(ta, "foo", 80, "version") f = tflow() f.request.host = "foo" |