diff options
author | Matthew Shao <me@matshao.com> | 2017-08-03 18:53:08 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-08-03 18:57:54 +0800 |
commit | b42f5bcb9dd6a8d2609b8351f846a654a1fd65c2 (patch) | |
tree | 66ef2cdf61337ef710555cb80d609f08db5bb89f /mitmproxy/test | |
parent | ddffcf83ecef8b6c81e5f23ff57ae17af6131219 (diff) | |
download | mitmproxy-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.py | 4 |
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( |