

@mock_redshift
def test_delete_cluster_security_group():
    conn = boto.connect_redshift()
    conn.create_cluster_security_group('my_security_group', 'This is my security group')
    groups_response = groups.describe_cluster_security_groups()
    groups = groups_response['DescribeClusterSecurityGroupsResponse']['DescribeClusterSecurityGroupsResult']['ClusterSecurityGroups']
    groups.should.have.length_of(2)
    conn.delete_cluster_security_group('my_security_group')
    groups_response = conn.describe_cluster_security_groups()
    groups = groups_response['DescribeClusterSecurityGroupsResponse']['DescribeClusterSecurityGroupsResult']['ClusterSecurityGroups']
    groups.should.have.length_of(1)
    conn.delete_cluster_security_group.when.called_with('not-a-security-group').should.throw(ClusterSecurityGroupNotFound)

dataset/ETHPy150Open spulec/moto/tests/test_redshift/test_redshift.py test_delete_cluster_security_group/VarMisuse@31/62 `conn`->`groups`