diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-08-03 13:20:36 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-08-03 13:20:36 +1200 |
commit | 12d2b1f926bedfb334ce625aad2e85c53e65f481 (patch) | |
tree | dfa4783dd0ee8b85dd4003eab4a8b5b453333138 /test/test_plugins.py | |
parent | 62088a666156f70b65d331bc002a946e58c76013 (diff) | |
download | mitmproxy-12d2b1f926bedfb334ce625aad2e85c53e65f481.tar.gz mitmproxy-12d2b1f926bedfb334ce625aad2e85c53e65f481.tar.bz2 mitmproxy-12d2b1f926bedfb334ce625aad2e85c53e65f481.zip |
Rip out old script interface, start replacing with new stubs.
Scripts are broken for now.
Diffstat (limited to 'test/test_plugins.py')
-rw-r--r-- | test/test_plugins.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/test_plugins.py b/test/test_plugins.py deleted file mode 100644 index 135d93ce..00000000 --- a/test/test_plugins.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -from libmproxy import plugins, flow -import libpry - -class uPlugin(libpry.AutoTree): - def test_simple(self): - s = flow.State() - fm = flow.FlowMaster(None, s) - - p = plugins.Plugin(os.path.join("plugins", "a.py"), fm) - assert "here" in p.ns - assert p.run("here") == (True, 1) - assert p.run("here") == (True, 2) - - ret = p.run("errargs") - assert not ret[0] - assert len(ret[1]) == 2 - - # Check reload - p.load() - assert p.run("here") == (True, 1) - - def test_err(self): - s = flow.State() - fm = flow.FlowMaster(None, s) - - libpry.raises(IOError, plugins.Plugin, "nonexistent", fm) - libpry.raises(SyntaxError, plugins.Plugin, os.path.join("plugins", "syntaxerr.py"), fm) - - - -tests = [ - uPlugin(), -] - |