diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-06-17 10:22:17 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-06-17 10:22:17 +1200 |
commit | 77b49aa8de7ce6695b31b7d6dd4e0b62e766a504 (patch) | |
tree | eb9c5ca6cad5d1e4f80d03c21f0781a9f8f90b2e /test | |
parent | 3227f67d883de2b77d83e77d7bc25afb04bc375f (diff) | |
download | mitmproxy-77b49aa8de7ce6695b31b7d6dd4e0b62e766a504.tar.gz mitmproxy-77b49aa8de7ce6695b31b7d6dd4e0b62e766a504.tar.bz2 mitmproxy-77b49aa8de7ce6695b31b7d6dd4e0b62e766a504.zip |
Add typechecking of Any values for state object
An ugly solution for an ugly little problem. This patch uses JSON's type
checker to validate Any values in stateobject, in order to avoid a circular
import.
Fixes #3180
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_stateobject.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/mitmproxy/test_stateobject.py b/test/mitmproxy/test_stateobject.py index a642e023..a2df57fc 100644 --- a/test/mitmproxy/test_stateobject.py +++ b/test/mitmproxy/test_stateobject.py @@ -125,7 +125,7 @@ def test_any(): assert a.x == b.x a = TAny(object()) - with pytest.raises(AssertionError): + with pytest.raises(ValueError): a.get_state() |