aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_optmanager.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/mitmproxy/test_optmanager.py b/test/mitmproxy/test_optmanager.py
index 1c49c0b8..77bcc007 100644
--- a/test/mitmproxy/test_optmanager.py
+++ b/test/mitmproxy/test_optmanager.py
@@ -426,4 +426,13 @@ def test_set():
assert opts.seqstr == []
with pytest.raises(exceptions.OptionsError):
- opts.set("nonexistent=wobble")
+ opts.set("deferred=wobble")
+
+ opts.set("deferred=wobble", defer=True)
+ assert "deferred" in opts._deferred
+ opts.process_deferred()
+ assert "deferred" in opts._deferred
+ opts.add_option("deferred", str, "default", "help")
+ opts.process_deferred()
+ assert "deferred" not in opts._deferred
+ assert opts.deferred == "wobble"