From 15229329dcc1da68f669f145208a65d489df5b8a Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Thu, 24 Mar 2016 21:44:10 +0200 Subject: Extract body property and test for bad preamble decoding --- test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test.py') diff --git a/test.py b/test.py index 84249b2..2cda602 100644 --- a/test.py +++ b/test.py @@ -9,5 +9,10 @@ class TestViewState(unittest.TestCase): vs = ViewState(f.read()) self.assertTrue(vs.is_valid()) + def test_invalid_decode(self): + with self.assertRaises(Exception): + vs = ViewState('\x01\x02') + vs.decode() + if __name__ == '__main__': unittest.main() -- cgit v1.3.1