aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/data/addonscripts/configure.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/test/mitmproxy/data/addonscripts/configure.py b/test/mitmproxy/data/addonscripts/configure.py
index 64abba6e..6f6ac06a 100644
--- a/test/mitmproxy/data/addonscripts/configure.py
+++ b/test/mitmproxy/data/addonscripts/configure.py
@@ -1,27 +1,21 @@
import typing
-from mitmproxy import ctx
from mitmproxy import exceptions
-class TestHeader:
+class OptionAddon:
def load(self, loader):
loader.add_option(
- name = "testheader",
+ name = "optionaddon",
typespec = typing.Optional[int],
default = None,
- help = "test header",
+ help = "Option Addon",
)
def configure(self, updates):
raise exceptions.OptionsError("Options Error")
- def response(self, flow):
- if ctx.options.testheader is not None:
- flow.response.headers["testheader"] = str(ctx.options.testheader)
-
-
addons = [
- TestHeader()
+ OptionAddon()
]