aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_app.py
blob: 5fb49563315c965f94eded8becf3454d3c20c78c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import mock
import socket
import os
import time
from libmproxy import dump
from netlib import certutils, tcp
from libpathod.pathoc import Pathoc
import tutils
import tservers


class TestApp(tservers.HTTPProxTest):
    def test_basic(self):
        assert self.app("/").status_code == 200

    def test_cert(self):
        with tutils.tmpdir() as d:
            for ext in ["pem", "p12"]:
                resp = self.app("/cert/%s" % ext)
                assert resp.status_code == 200
                assert resp.content