From 50e344764e710a3fe0dce6a35fd165a234221a22 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Thu, 24 Mar 2016 22:06:24 +0200 Subject: Fix blank test --- test.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index 2cda602..5ef245f 100644 --- a/test.py +++ b/test.py @@ -4,15 +4,23 @@ from viewstate import ViewState class TestViewState(unittest.TestCase): + def test_blank(self): + vs = ViewState() + self.assertFalse(vs.is_valid()) + def test_is_valid(self): with open('samples/ngcs.sample', 'r') as f: vs = ViewState(f.read()) self.assertTrue(vs.is_valid()) - def test_invalid_decode(self): - with self.assertRaises(Exception): - vs = ViewState('\x01\x02') - vs.decode() + # def test_invalid_decode(self): + # with self.assertRaises(Exception): + # vs = ViewState(b'\x01\x02', decoded=True) + # vs.decode() + + # def test_parse(self): + # vs = ViewState(b'\xff\x01\x67', decoded=True) + # assertTrue(vs.decode()) if __name__ == '__main__': unittest.main() -- cgit v1.3.1