diff options
| author | Yuval Adam <yuval@y3xz.com> | 2016-03-24 21:44:10 +0200 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2016-03-24 21:44:10 +0200 |
| commit | 15229329dcc1da68f669f145208a65d489df5b8a (patch) | |
| tree | 18f9e57916873d9b6796a793359928aa35267b65 /test.py | |
| parent | a1818155eae246a4f9a1214a1bbfe35adef7a309 (diff) | |
Extract body property and test for bad preamble decoding
Diffstat (limited to 'test.py')
| -rw-r--r-- | test.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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() |
