blob: 3591284ddf7b96d12665fa3d0f5a01bc8dd16271 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
from mitmproxy.tools.web import master
from mitmproxy import proxy
from mitmproxy import options
from mitmproxy.proxy.config import ProxyConfig
from . import mastertest
class TestWebMaster(mastertest.MasterTest):
def mkmaster(self, **opts):
o = options.Options(**opts)
c = ProxyConfig(o)
return master.WebMaster(o, proxy.DummyServer(c))
def test_basic(self):
m = self.mkmaster()
for i in (1, 2, 3):
self.dummy_cycle(m, 1, b"")
assert len(m.view) == i
|