aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2017-03-07 10:28:15 +1300
committerAldo Cortesi <aldo@nullcube.com>2017-03-07 10:28:15 +1300
commitb51df9a0b1cc9da1d7381421dfac481da6205a7a (patch)
treef61be6a2e0d0ac526ff237cf42b5270c3c42378a /mitmproxy/test
parent2312cf6fb08e6c3f208a9bfe4af93c193dfd9ab1 (diff)
downloadmitmproxy-b51df9a0b1cc9da1d7381421dfac481da6205a7a.tar.gz
mitmproxy-b51df9a0b1cc9da1d7381421dfac481da6205a7a.tar.bz2
mitmproxy-b51df9a0b1cc9da1d7381421dfac481da6205a7a.zip
Cleanups and test coverage
Diffstat (limited to 'mitmproxy/test')
-rw-r--r--mitmproxy/test/taddons.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/test/taddons.py b/mitmproxy/test/taddons.py
index c3e19cc7..8d6baa12 100644
--- a/mitmproxy/test/taddons.py
+++ b/mitmproxy/test/taddons.py
@@ -61,5 +61,6 @@ class context:
Options object with the given keyword arguments, then calls the
configure method on the addon with the updated value.
"""
- self.options.update(**kwargs)
- addon.configure(self.options, kwargs.keys())
+ with self.options.rollback(kwargs.keys(), reraise=True):
+ self.options.update(**kwargs)
+ addon.configure(self.options, kwargs.keys())