aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-07-14 18:46:07 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-07-14 19:54:15 +1200
commita4127fb6d5f026c015525bab7993bf6f33e16f93 (patch)
treeaaed1851f42ec3d5c3f0c96f8324fe6575e26c0d /test
parent5b2d1c044a0683444f117d8085e29bb613dbbf9d (diff)
downloadmitmproxy-a4127fb6d5f026c015525bab7993bf6f33e16f93.tar.gz
mitmproxy-a4127fb6d5f026c015525bab7993bf6f33e16f93.tar.bz2
mitmproxy-a4127fb6d5f026c015525bab7993bf6f33e16f93.zip
Add a tick event for addons and scripts, and use it for race-free reload
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/builtins/test_script.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/mitmproxy/builtins/test_script.py b/test/mitmproxy/builtins/test_script.py
index 2447c8ea..394c3f38 100644
--- a/test/mitmproxy/builtins/test_script.py
+++ b/test/mitmproxy/builtins/test_script.py
@@ -78,6 +78,7 @@ class TestScript(mastertest.MasterTest):
for _ in range(100):
with open("foo.py", "a") as f:
f.write(".")
+ m.addons.invoke_with_context(sc, "tick")
time.sleep(0.1)
if m.event_log:
return