

def test_absent_when_failing_to_delete_a_deployment_no_longer_associated_with_any_stages(self):
    '\n        Tests scenario where stagename exists and is deleted, but a failure occurs when trying to delete\n        the deployment which is no longer associated to any other stages\n        '
    self.conn.get_rest_apis.return_value = apis_ret
    self.conn.get_stage.return_value = stage1_deployment1_ret
    self.conn.delete_stage.return_value = {
        'ResponseMetadata': {
            'HTTPStatusCode': 200,
            'RequestId': '2d31072c-9d15-11e5-9977-6d9fcfda9c0a',
        },
    }
    self.conn.get_stages.return_value = no_stages_ret
    self.conn.delete_deployment.side_effect = ClientError(error_content, 'delete_deployment')
    result = salt_states['boto_apigateway.absent']('api present', 'unit test api', 'test', nuke_api=False, **conn_parameters)
    self.assertTrue(result.get('abort', False))

dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_apigateway_test.py BotoApiGatewayTestCase.test_absent_when_failing_to_delete_a_deployment_no_longer_associated_with_any_stages/original