diff options
| -rw-r--r-- | tests/test_parse.py | 7 | ||||
| -rw-r--r-- | viewstate/parse.py | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py index 62f0f23..d215fd4 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -36,9 +36,10 @@ class TestParse(object): vs = ViewState(raw=b'\xff\x01\x10\x67\x68\x67') assert vs.decode() == (True, False, True) - def test_unknown_color(self): - vs = ViewState(raw=b'\xff\x01\n\x01\x02') - assert vs.decode() == 'Color: unknown' # all colors are unknown for now + @pytest.mark.skip(reason='Color parsing is not yet supported') + def test_color(self): + vs = ViewState(raw=b'\xff\x01\n\x91\x01') + assert vs.decode() == 'Color: Salmon' def test_rgba(self): vs = ViewState(raw=b'\xff\x01\x09\x10\x20\x30\x40') diff --git a/viewstate/parse.py b/viewstate/parse.py index 5e5f9b4..0d8e226 100644 --- a/viewstate/parse.py +++ b/viewstate/parse.py @@ -21,7 +21,10 @@ class ParserMeta(type): class Parser(metaclass=ParserMeta): - + ''' + Main parser class delegates parsing according to current byte marker + Performs lookup on metaclass registry + ''' @staticmethod def parse(b): marker, remain = b[0], b[1:] |
