Exemple #1
0
 def test_loads_many(self):
     json_s = '[{"xs": [1]}]'
     assert (DataClassWithList.schema().loads(
         json_s, many=True) == [DataClassWithList([1])])
Exemple #2
0
 def test_dumps_many(self):
     actual = DataClassWithList.schema().dumps([DataClassWithList([1])],
                                               many=True)
     json_s = '[{"xs": [1]}]'
     assert actual == json_s