Ejemplo n.º 1
0
 def test_loads_many_nested(self):
     json_s = '[{"dc_with_list": {"xs": [1]}}]'
     assert (DataClassWithDataClass.schema().loads(json_s, many=True) == [
         DataClassWithDataClass(DataClassWithList([1]))
     ])
Ejemplo n.º 2
0
 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