diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-07-23 11:03:50 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-07-23 11:03:50 +1200 |
commit | 51a8ba57f1a6e8fdece5daf893176ccb67d18b1a (patch) | |
tree | d79bb0de38213f0f9c1b42a62d65b35e2e1b1b9c /test | |
parent | 65c2f302186680c09c4a3f10a098000675ae8507 (diff) | |
download | mitmproxy-51a8ba57f1a6e8fdece5daf893176ccb67d18b1a.tar.gz mitmproxy-51a8ba57f1a6e8fdece5daf893176ccb67d18b1a.tar.bz2 mitmproxy-51a8ba57f1a6e8fdece5daf893176ccb67d18b1a.zip |
script: add a namespace adaptor to match Addons
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/builtins/test_script.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/mitmproxy/builtins/test_script.py b/test/mitmproxy/builtins/test_script.py index f37c7f94..1658088c 100644 --- a/test/mitmproxy/builtins/test_script.py +++ b/test/mitmproxy/builtins/test_script.py @@ -48,7 +48,7 @@ def test_load_script(): "data/addonscripts/recorder.py" ), [] ) - assert ns["configure"] + assert ns.configure class TestScript(mastertest.MasterTest): @@ -61,16 +61,16 @@ class TestScript(mastertest.MasterTest): ) ) m.addons.add(sc) - assert sc.ns["call_log"] == [ + assert sc.ns.call_log == [ ("solo", "start", (), {}), ("solo", "configure", (options.Options(),), {}) ] - sc.ns["call_log"] = [] + sc.ns.call_log = [] f = tutils.tflow(resp=True) self.invoke(m, "request", f) - recf = sc.ns["call_log"][0] + recf = sc.ns.call_log[0] assert recf[1] == "request" def test_reload(self): |