def should_unmarshal(self): converter = JsonConverter() json = '{"a": {"c": [1, 2, 3]}, "b": 2}' result = converter.unmarshal(json) assert result.a.c == [1, 2, 3] assert result.b == 2
def should_marshal(self): converter = JsonConverter() d = {'a': {'c': [1, 2, 3]}, 'b': 2} result = converter.marshal(d) assert result == '{"a": {"c": [1, 2, 3]}, "b": 2}'