Ejemplo n.º 1
0
 def test_my_collection(self):
     assert (DataClassWithMyCollection.from_json('{"xs": [1]}') ==
             DataClassWithMyCollection(MyCollection([1])))
Ejemplo n.º 2
0
 def test_my_list_collection(self):
     assert (DataClassWithMyCollection.from_json_array('[{"xs": [1]}]') == [
         DataClassWithMyCollection(MyCollection([1]))
     ])
Ejemplo n.º 3
0
 def test_my_collection(self):
     assert DataClassWithMyCollection(MyCollection(
         [1])).to_json() == '{"xs": [1]}'