def test_loads_many_nested(self): json_s = '[{"dc_with_list": {"xs": [1]}}]' assert (DataClassWithDataClass.schema().loads(json_s, many=True) == [ DataClassWithDataClass(DataClassWithList([1])) ])
def test_dumps_many_nested(self): dumped = DataClassWithDataClass.schema().dumps( [DataClassWithDataClass(DataClassWithList([1]))], many=True) json_s = '[{"dc_with_list": {"xs": [1]}}]' assert dumped == json_s