def test_path(): expected = '{"Path": ["bar", false]}' assert json.dumps(db_attrs.Path('bar'), cls=QueryEncoder) == expected
def test_path_inverted(): expected = '{"Path": ["bar", true]}' assert json.dumps(~db_attrs.Path('bar'), cls=QueryEncoder) == expected
def test_decode_path(): dump = '{"Path": ["bar", false]}' assert json.loads(dump, object_hook=query_decode) == db_attrs.Path('bar')