mitmproxy/test/test_app.py

17 lines
497 B
Python
Raw Normal View History

2014-02-07 03:15:24 +00:00
import mock, socket, os, time
2014-02-07 01:36:39 +00:00
from libmproxy import dump
2014-02-07 03:15:24 +00:00
from netlib import certutils, tcp
2014-02-07 01:36:39 +00:00
from libpathod.pathoc import Pathoc
import tutils, tservers
2014-02-07 01:36:39 +00:00
class TestApp(tservers.HTTPProxTest):
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