mitmproxy/test/test_app.py

16 lines
378 B
Python
Raw Normal View History

2015-05-30 00:03:28 +00:00
import tutils
import tservers
2014-02-07 01:36:39 +00:00
class TestApp(tservers.HTTPProxTest):
2016-01-27 09:12:18 +00:00
2014-02-07 01:36:39 +00:00
def test_basic(self):
assert self.app("/").status_code == 200
2014-02-07 01:36:39 +00:00
def test_cert(self):
with tutils.tmpdir() as d:
for ext in ["pem", "p12"]:
resp = self.app("/cert/%s" % ext)
2014-02-07 01:36:39 +00:00
assert resp.status_code == 200
assert resp.content