diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-03-19 14:28:29 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-03-19 14:36:23 +1300 |
commit | 04f1a4443d2a01b66046d83f919c7e7ba4478b74 (patch) | |
tree | fe2b9b479573707737b5d5c155022bb2ef97f6f9 /test | |
parent | 8d68196fd04e6e7239c49141603d9385a017d808 (diff) | |
download | mitmproxy-04f1a4443d2a01b66046d83f919c7e7ba4478b74.tar.gz mitmproxy-04f1a4443d2a01b66046d83f919c7e7ba4478b74.tar.bz2 mitmproxy-04f1a4443d2a01b66046d83f919c7e7ba4478b74.zip |
options: reraise when there's an error with a partial update
Fixes #2174
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_optmanager.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/mitmproxy/test_optmanager.py b/test/mitmproxy/test_optmanager.py index ef5ebd27..01636640 100644 --- a/test/mitmproxy/test_optmanager.py +++ b/test/mitmproxy/test_optmanager.py @@ -210,8 +210,12 @@ def test_rollback(): o.errored.connect(errsub) assert o.one is None - o.one = 10 - o.bool = True + with pytest.raises(exceptions.OptionsError): + o.one = 10 + assert o.one is None + with pytest.raises(exceptions.OptionsError): + o.bool = True + assert o.bool is False assert isinstance(recerr[0]["exc"], exceptions.OptionsError) assert o.one is None assert o.bool is False |