From 1d5eedcc9cf63f9601e483f567f8e13a1ab40d89 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 29 Apr 2017 11:48:25 +1200 Subject: command: flow.revert Plus matching binding in flowlist. --- test/mitmproxy/addons/test_core.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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() -- cgit v1.2.3