コード例 #1
0
 def test_my_collection(self):
     assert (DataClassWithMyCollection.from_json('{"xs": [1]}') ==
             DataClassWithMyCollection(MyCollection([1])))
コード例 #2
0
 def test_my_list_collection(self):
     assert (DataClassWithMyCollection.from_json_array('[{"xs": [1]}]') == [
         DataClassWithMyCollection(MyCollection([1]))
     ])
コード例 #3
0
 def test_my_collection(self):
     assert DataClassWithMyCollection(MyCollection(
         [1])).to_json() == '{"xs": [1]}'