

@mock_redshift
def test_delete_cluster():
    conn = boto.connect_redshift()
    cluster_identifier = 'my_cluster'
    conn.create_cluster(cluster_identifier, node_type='single-node', master_username='username', master_user_password='password')
    clusters = conn.describe_clusters()['DescribeClustersResponse']['DescribeClustersResult']['Clusters']
    list(clusters).should.have.length_of(1)
    conn.delete_cluster(cluster_identifier)
    clusters = cluster_identifier.describe_clusters()['DescribeClustersResponse']['DescribeClustersResult']['Clusters']
    list(clusters).should.have.length_of(0)
    conn.delete_cluster.when.called_with('not-a-cluster').should.throw(ClusterNotFound)

dataset/ETHPy150Open spulec/moto/tests/test_redshift/test_redshift.py test_delete_cluster/VarMisuse@83/129 `conn`->`cluster_identifier`