summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2018-02-19 22:54:31 +0100
committerYuval Adam <_@yuv.al>2018-02-19 22:54:31 +0100
commite2dd75dbdb3e01c726e6030bf21c7c86398632d7 (patch)
tree4e3da797b8dda284ccff0bedfb8fcafdb9b2f4bf /tests
parent647ac4e5507f458b02883c7b84a57cfe971b732d (diff)
Add array support and pretty printing
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 617a9a7..a1a39a4 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -40,6 +40,11 @@ class TestViewState(object):
vs.raw = b'\xff\x01\x18\x02\x05\x01a\x05\x01b\x05\x01c\x05\x01d'
assert vs.decode() == {'a': 'b', 'c': 'd'}
+ def test_parse_simple_list(self):
+ vs = ViewState()
+ vs.raw = b'\xff\x01\x16\x05\x05\x01a\x05\x01b\x05\x01c\x05\x01d\x05\x01e'
+ assert vs.decode() == ['a', 'b', 'c', 'd', 'e']
+
def test_parse_simple_pair(self):
vs = ViewState()
vs.raw = b'\xff\x01\x0f\x67\x68'