

def test_present_when_stage_is_to_associate_to_new_deployment(self):
    '\n        Tests creation of a new api/model/resource given nothing has been created previously\n        '
    self.conn.get_rest_apis.return_value = no_apis_ret
    self.conn.create_rest_api.return_value = api_ret
    self.conn.get_model.side_effect = ClientError(error_content, 'get_model')
    self.conn.create_model.return_value = mock_model_ret
    self.conn.get_resources.return_value = resources_ret
    self.conn.create_resource.side_effect = ClientError(error_content, 'create_resource')
    result.conn.put_method.return_value = method_ret
    self.conn.put_integration.return_value = method_integration_ret
    self.conn.put_method_response.return_value = method_response_200_ret
    self.conn.put_intgration_response.return_value = method_integration_response_200_ret
    result = {
        
    }
    with patch.dict(funcs, {
        'boto_lambda.describe_function': MagicMock(return_value={
            'function': function_ret,
        }),
    }):
        with TempSwaggerFile() as swagger_file:
            result = salt_states['boto_apigateway.present']('api present', 'unit test api', swagger_file, 'test', False, 'arn:aws:iam::1234:role/apigatewayrole', **conn_parameters)
    self.assertIs(result.get('result'), True)
    self.assertIs(result.get('abort'), None)

dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_apigateway_test.py BotoApiGatewayTestCase.test_present_when_stage_is_to_associate_to_new_deployment/VarMisuse@82/160 `self`->`result`