@@ -417,3 +417,27 @@ def test_put_get_collection(cache, key, hinted_value, value):
417417async def test_put_get_collection_async (async_cache , key , hinted_value , value ):
418418 await async_cache .put (key , hinted_value )
419419 assert await async_cache .get (key ) == value
420+
421+
422+ @pytest .fixture
423+ def complex_map ():
424+ return {"test" + str (i ): ((MapObject .HASH_MAP ,
425+ {"key_1" : ((1 , ["value_1" , 1.0 ]), CollectionObject ),
426+ "key_2" : ((1 , [["value_2_1" , "1.0" ], ["value_2_2" , "0.25" ]]), CollectionObject ),
427+ "key_3" : ((1 , [["value_3_1" , "1.0" ], ["value_3_2" , "0.25" ]]), CollectionObject ),
428+ "key_4" : ((1 , [["value_4_1" , "1.0" ], ["value_4_2" , "0.25" ]]), CollectionObject ),
429+ 'key_5' : False ,
430+ "key_6" : "value_6" }), MapObject ) for i in range (10000 )}
431+
432+
433+ def test_put_all_large_complex_map (cache , complex_map ):
434+ cache .put_all (complex_map )
435+ values = cache .get_all (complex_map .keys ())
436+ assert len (values ) == len (complex_map )
437+
438+
439+ @pytest .mark .asyncio
440+ async def test_put_all_large_complex_map_async (async_cache , complex_map ):
441+ await async_cache .put_all (complex_map )
442+ values = await async_cache .get_all (complex_map .keys ())
443+ assert len (values ) == len (complex_map )
0 commit comments