aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_core.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_core.py b/test/mitmproxy/addons/test_core.py
index 2d9ee751..9501fb22 100644
--- a/test/mitmproxy/addons/test_core.py
+++ b/test/mitmproxy/addons/test_core.py
@@ -3,6 +3,7 @@ from mitmproxy.test import taddons
from mitmproxy.test import tflow
from mitmproxy import exceptions
import pytest
+from unittest import mock
def test_set():
@@ -40,3 +41,22 @@ def test_mark():
assert not f.marked
sa.mark_toggle([f])
assert f.marked
+
+
+def test_replay():
+ sa = core.Core()
+ with taddons.context():
+ f = tflow.tflow()
+ with mock.patch("mitmproxy.master.Master.replay_request") as rp:
+ sa.replay(f)
+ assert rp.called
+
+
+def test_kill():
+ sa = core.Core()
+ with taddons.context():
+ f = tflow.tflow()
+ f.intercept()
+ assert f.killable
+ sa.kill([f])
+ assert not f.killable