diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-07-16 11:46:01 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-16 11:46:01 +1200 |
commit | 50c76ac4ff4dbc8442f60d5887ffbff5f96ecf20 (patch) | |
tree | a4ec369f03b6fbd66b3363a93b6fec62cd7b0da1 /test | |
parent | c4fb489a96c58932609cced96d5b0d3c2687f15f (diff) | |
parent | 50f1495f29adee2d3eda011693518ca5ba938037 (diff) | |
download | mitmproxy-50c76ac4ff4dbc8442f60d5887ffbff5f96ecf20.tar.gz mitmproxy-50c76ac4ff4dbc8442f60d5887ffbff5f96ecf20.tar.bz2 mitmproxy-50c76ac4ff4dbc8442f60d5887ffbff5f96ecf20.zip |
Merge pull request #1362 from cortesi/errors
Some work on errors and logs
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/mastertest.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_dump.py | 3 | ||||
-rw-r--r-- | test/mitmproxy/test_examples.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/tservers.py | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/test/mitmproxy/mastertest.py b/test/mitmproxy/mastertest.py index 240f6a73..d1fe8cb4 100644 --- a/test/mitmproxy/mastertest.py +++ b/test/mitmproxy/mastertest.py @@ -47,5 +47,5 @@ class RecordingMaster(master.FlowMaster): master.FlowMaster.__init__(self, *args, **kwargs) self.event_log = [] - def add_event(self, e, level): + def add_log(self, e, level): self.event_log.append((level, e)) diff --git a/test/mitmproxy/test_dump.py b/test/mitmproxy/test_dump.py index 201386e3..c94630a9 100644 --- a/test/mitmproxy/test_dump.py +++ b/test/mitmproxy/test_dump.py @@ -235,7 +235,8 @@ class TestDumpMaster(mastertest.MasterTest): ret = self.dummy_cycle( self.mkmaster( None, - scripts=[tutils.test_data.path("data/scripts/all.py")], verbosity=1 + scripts=[tutils.test_data.path("data/scripts/all.py")], + verbosity=2 ), 1, b"", ) diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index f8646336..0ec85f52 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -21,7 +21,7 @@ class ScriptError(Exception): class RaiseMaster(master.FlowMaster): - def add_event(self, e, level): + def add_log(self, e, level): if level in ("warn", "error"): raise ScriptError(e) diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py index 69a50b9d..9a66984b 100644 --- a/test/mitmproxy/tservers.py +++ b/test/mitmproxy/tservers.py @@ -42,7 +42,7 @@ class TestMaster(flow.FlowMaster): def clear_log(self): self.tlog = [] - def add_event(self, message, level=None): + def add_log(self, message, level=None): self.tlog.append(message) |