<s> import boto3 . session <EOL> from boto3 . resources . collection import CollectionManager <EOL> REGION_MAP = { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> BLACKLIST = { <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] <EOL> } <EOL> def test_all_collections ( ) : <EOL> session = boto3 . session . Session ( ) <EOL> for service_name in session . get_available_resources ( ) : <EOL> resource = session . resource ( <EOL> service_name , <EOL> region_name = REGION_MAP . get ( service_name , '<STR_LIT>' ) ) <EOL> for key in dir ( resource ) : <EOL> if key in BLACKLIST . get ( service_name , [ ] ) : <EOL> continue <EOL> value = getattr ( resource , key ) <EOL> if isinstance ( value , CollectionManager ) : <EOL> yield _test_collection , service_name , key , value <EOL> def _test_collection ( service_name , collection_name , collection ) : <EOL> list ( collection . limit ( <NUM_LIT:1> ) ) </s>
