diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-04-29 11:48:25 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-04-29 11:48:25 +1200 |
commit | 1d5eedcc9cf63f9601e483f567f8e13a1ab40d89 (patch) | |
tree | c7a4cae7e31413d5ed7ada10ea2cd83de8d6d85e /test | |
parent | f908ea220f78754266a54dd57f34dcc24d761f1d (diff) | |
download | mitmproxy-1d5eedcc9cf63f9601e483f567f8e13a1ab40d89.tar.gz mitmproxy-1d5eedcc9cf63f9601e483f567f8e13a1ab40d89.tar.bz2 mitmproxy-1d5eedcc9cf63f9601e483f567f8e13a1ab40d89.zip |
command: flow.revert
Plus matching binding in flowlist.
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_core.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_core.py b/test/mitmproxy/addons/test_core.py index 25fefb5d..64d0fa19 100644 --- a/test/mitmproxy/addons/test_core.py +++ b/test/mitmproxy/addons/test_core.py @@ -50,3 +50,14 @@ def test_kill(): assert f.killable sa.kill([f]) assert not f.killable + + +def test_revert(): + sa = core.Core() + with taddons.context(): + f = tflow.tflow() + f.backup() + f.request.content = b"bar" + assert f.modified() + sa.revert([f]) + assert not f.modified() |