aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/test_web_master.py
blob: 267715ade463a9e1ae02e1b6c1d19163d5dc0f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from mitmproxy.web import master
from mitmproxy import proxy
from . import mastertest


class TestWebMaster(mastertest.MasterTest):
    def mkmaster(self, **options):
        o = master.Options(**options)
        return master.WebMaster(o, proxy.DummyServer(o))

    def test_basic(self):
        m = self.mkmaster()
        for i in (1, 2, 3):
            self.dummy_cycle(m, 1, b"")
            assert len(m.state.flows) == i