

@mock.patch('boto3.resources.action.create_request_parameters', return_value={
    'bar': 'baz',
})
def test_service_action_calls_operation(self, params_mock):
    resource = mock.Mock()
    resource.meta = ResourceMeta('test', client=mock.Mock())
    operation = self.meta.client.get_frobs
    operation.return_value = 'response'
    action = ServiceAction(self.action)
    response = action(resource, foo=1)
    operation.assert_called_with(foo=1, bar='baz')
    self.assertEqual(response, 'response', 'Unexpected low-level response data returned')

dataset/ETHPy150Open boto/boto3/tests/unit/resources/test_action.py TestServiceActionCall.test_service_action_calls_operation/VarMisuse@58/86 `resource`->`self`