summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2016-03-24 21:44:10 +0200
committerYuval Adam <yuval@y3xz.com>2016-03-24 21:44:10 +0200
commit15229329dcc1da68f669f145208a65d489df5b8a (patch)
tree18f9e57916873d9b6796a793359928aa35267b65 /test.py
parenta1818155eae246a4f9a1214a1bbfe35adef7a309 (diff)
Extract body property and test for bad preamble decoding
Diffstat (limited to 'test.py')
-rw-r--r--test.py5
1 files changed, 5 insertions, 0 deletions
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()