diff options
Diffstat (limited to 'test/test_server.py')
-rw-r--r-- | test/test_server.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_server.py b/test/test_server.py index fbd5af39..6a88578c 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -53,7 +53,16 @@ class CommonMixin: assert "Bad Request" in t.rfile.readline() -class TestHTTP(tservers.HTTPProxTest, CommonMixin): + +class AppMixin: + def test_app(self): + ret = self.app("/") + assert ret.status_code == 200 + assert "mitmproxy" in ret.content + + + +class TestHTTP(tservers.HTTPProxTest, CommonMixin, AppMixin): def test_app_err(self): p = self.pathoc() ret = p.request("get:'http://errapp/'") @@ -135,6 +144,7 @@ class TestHTTP(tservers.HTTPProxTest, CommonMixin): assert req.status_code == 400 + class TestHTTPAuth(tservers.HTTPProxTest): authenticator = http_auth.BasicProxyAuth(http_auth.PassManSingleUser("test", "test"), "realm") def test_auth(self): |