mitmproxy/test/mitmproxy/test_web_master.py
Aldo Cortesi 50deaf56bf Remove addons.State
- Do a first-pass port of mitmweb. Some stuff still broken.
- Remove more all State tests from the test suite
2016-11-01 10:06:28 +13:00

16 lines
427 B
Python

from mitmproxy.tools.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.view) == i