mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-31 07:18:58 +00:00
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.
This commit is contained in:
parent
2bd7bcb371
commit
ce02874e2a
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user