aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/test
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-08-03 18:53:08 +0800
committerMatthew Shao <me@matshao.com>2017-08-03 18:57:54 +0800
commitb42f5bcb9dd6a8d2609b8351f846a654a1fd65c2 (patch)
tree66ef2cdf61337ef710555cb80d609f08db5bb89f /mitmproxy/test
parentddffcf83ecef8b6c81e5f23ff57ae17af6131219 (diff)
downloadmitmproxy-b42f5bcb9dd6a8d2609b8351f846a654a1fd65c2.tar.gz
mitmproxy-b42f5bcb9dd6a8d2609b8351f846a654a1fd65c2.tar.bz2
mitmproxy-b42f5bcb9dd6a8d2609b8351f846a654a1fd65c2.zip
Update taddon and tests.
Diffstat (limited to 'mitmproxy/test')
-rw-r--r--mitmproxy/test/taddons.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/test/taddons.py b/mitmproxy/test/taddons.py
index 3859e4d2..d966f1d5 100644
--- a/mitmproxy/test/taddons.py
+++ b/mitmproxy/test/taddons.py
@@ -105,8 +105,8 @@ class context:
Options object with the given keyword arguments, then calls the
configure method on the addon with the updated value.
"""
- loader = addonmanager.Loader(self.master)
- self.master.addons.invoke_addon(addon, "load", loader)
+ if addon not in self.master.addons:
+ self.master.addons.register(addon)
with self.options.rollback(kwargs.keys(), reraise=True):
self.options.update(**kwargs)
self.master.addons.invoke_addon(