From 44f94c884481c768991a4817bb4772d0c3e59bef Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 13 Dec 2016 14:09:06 +0100 Subject: use types.SimpleNamespace instead of custom NS class --- test/mitmproxy/addons/test_script.py | 7 ------- test/mitmproxy/test_examples.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'test') diff --git a/test/mitmproxy/addons/test_script.py b/test/mitmproxy/addons/test_script.py index 06463fa3..777f8f4d 100644 --- a/test/mitmproxy/addons/test_script.py +++ b/test/mitmproxy/addons/test_script.py @@ -18,13 +18,6 @@ import watchdog.events from .. import tutils as ttutils -def test_ns(): - n = script.NS({}) - n.one = "one" - assert n.one == "one" - assert n.__dict__["ns"]["one"] == "one" - - def test_scriptenv(): with taddons.context() as tctx: with script.scriptenv("path", []): diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index 8db2507f..610c9dad 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -150,7 +150,7 @@ class TestHARDump: def test_format_cookies(self): m, sc = tscript("complex/har_dump.py", "-") - format_cookies = sc.ns.ns["format_cookies"] + format_cookies = sc.ns.format_cookies CA = cookies.CookieAttrs -- cgit v1.2.3