

@mock.patch('boto3.resources.model.Collection')
def test_resource_loads_collections(self, mock_model):
    model = {
        'hasMany': {
            'Queues': {
                'request': {
                    'operation': 'ListQueues',
                },
                'resource': {
                    'type': 'Queue',
                },
            },
        },
    }
    defs = {
        'Queue': {
            
        },
    }
    service_model = ServiceModel({
        
    })
    mock_model.return_value.name = 'queues'
    resource = self.load('test', model, defs, service_model)()
    self.assertTrue(hasattr(resource, 'queues'), 'Resource should expose queues collection')
    self.assertIsInstance(resource.queues, CollectionManager, 'Queues collection should be a collection manager')

dataset/ETHPy150Open boto/boto3/tests/unit/resources/test_factory.py TestResourceFactory.test_resource_loads_collections/original