From 0903f9b06475cdd95212acacd50748acf7106759 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Thu, 24 Mar 2016 22:12:32 +0200 Subject: Fix body and preamble properties --- test.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index 5ef245f..1f84bc2 100644 --- a/test.py +++ b/test.py @@ -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() -- cgit v1.3.1