diff options
| author | Yuval Adam <yuval@y3xz.com> | 2016-03-24 22:12:32 +0200 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2016-03-24 22:12:32 +0200 |
| commit | 0903f9b06475cdd95212acacd50748acf7106759 (patch) | |
| tree | 186a8168bfe5485b5c5b6132cf03982c484581e8 /test.py | |
| parent | 50e344764e710a3fe0dce6a35fd165a234221a22 (diff) | |
Fix body and preamble properties
Diffstat (limited to 'test.py')
| -rw-r--r-- | test.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -13,14 +13,16 @@ class TestViewState(unittest.TestCase): vs = ViewState(f.read()) self.assertTrue(vs.is_valid()) - # def test_invalid_decode(self): - # with self.assertRaises(Exception): - # vs = ViewState(b'\x01\x02', decoded=True) - # vs.decode() + def test_invalid_decode(self): + with self.assertRaises(Exception): + vs = ViewState() + vs.raw = b'\x01\x02' + vs.decode() # def test_parse(self): - # vs = ViewState(b'\xff\x01\x67', decoded=True) - # assertTrue(vs.decode()) + # vs = ViewState() + # vs.raw = b'\xff\x01\x67' + # self.assertTrue(vs.decode()) if __name__ == '__main__': unittest.main() |
