

@mock.patch('boto3.resources.action.create_request_parameters', return_value={
    
})
@mock.patch('boto3.resources.action.ResourceHandler')
def test_service_action_calls_resource_handler(self, handler_mock, params_mock):
    self.action_def['resource'] = {
        'type': 'Frob',
        'path': 'Container',
    }
    resource = mock.Mock()
    resource.meta = ResourceMeta('test', client=mock.Mock())
    operation = resource.meta.client.get_frobs
    operation.return_value = 'response'
    factory = mock.Mock()
    resource_defs = {
        
    }
    service_model = mock.Mock()
    action_model = self.action
    service_context = ServiceContext(service_name='test', service_model=service_model, resource_json_definitions=resource_defs, service_waiter_model=None)
    action = ServiceAction(action_model=action_model, factory=factory, service_context=service_context)
    handler_mock.return_value.return_value = 'response'
    action(resource)
    handler_mock.assert_called_with(search_path='Container', factory=self, resource_model=action_model.resource, service_context=service_context, operation_name='GetFrobs')

dataset/ETHPy150Open boto/boto3/tests/unit/resources/test_action.py TestServiceActionCall.test_service_action_calls_resource_handler/VarMisuse@189/288 `factory`->`self`