diff options
| author | Yuval Adam <_@yuv.al> | 2018-02-19 23:04:52 +0100 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-02-19 23:04:52 +0100 |
| commit | ab5c726c229cd1a3756a77394efb7cc216501379 (patch) | |
| tree | a9a9cedba2dd8ec2e8bad13d113a9336d8e0dc9d /tests | |
| parent | e2dd75dbdb3e01c726e6030bf21c7c86398632d7 (diff) | |
Raise exception on unknown bytes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_core.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index a1a39a4..bfb6c4f 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -60,7 +60,7 @@ class TestViewState(object): assert vs.decode() == ((True, '1q2w3e'), 0) def test_parse_unknown(self): - vs = ViewState() - vs.raw = b'\xff\x01\x99\x99\x99' - assert vs.decode() == b'\x99\x99\x99' - + with pytest.raises(ViewStateException): + vs = ViewState() + vs.raw = b'\xff\x01\x99\x99\x99' + assert vs.decode() |
