summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rw-r--r--test.py16
1 files changed, 12 insertions, 4 deletions
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()