

@mock_redshift
def test_create_cluster():
    conn = boto.redshift.connect_to_region('us-east-1')
    cluster_identifier = 'my_cluster'
    cluster_identifier.create_cluster(cluster_identifier, node_type='dw.hs1.xlarge', master_username='username', master_user_password='password', db_name='my_db', cluster_type='multi-node', availability_zone='us-east-1d', preferred_maintenance_window='Mon:03:00-Mon:11:00', automated_snapshot_retention_period=10, port=1234, cluster_version='1.0', allow_version_upgrade=True, number_of_nodes=3)
    cluster_response = conn.describe_clusters(cluster_identifier)
    cluster = cluster_response['DescribeClustersResponse']['DescribeClustersResult']['Clusters'][0]
    cluster['ClusterIdentifier'].should.equal(cluster_identifier)
    cluster['NodeType'].should.equal('dw.hs1.xlarge')
    cluster['MasterUsername'].should.equal('username')
    cluster['DBName'].should.equal('my_db')
    cluster['ClusterSecurityGroups'][0]['ClusterSecurityGroupName'].should.equal('Default')
    cluster['VpcSecurityGroups'].should.equal([])
    cluster['ClusterSubnetGroupName'].should.equal(None)
    cluster['AvailabilityZone'].should.equal('us-east-1d')
    cluster['PreferredMaintenanceWindow'].should.equal('Mon:03:00-Mon:11:00')
    cluster['ClusterParameterGroups'][0]['ParameterGroupName'].should.equal('default.redshift-1.0')
    cluster['AutomatedSnapshotRetentionPeriod'].should.equal(10)
    cluster['Port'].should.equal(1234)
    cluster['ClusterVersion'].should.equal('1.0')
    cluster['AllowVersionUpgrade'].should.equal(True)
    cluster['NumberOfNodes'].should.equal(3)

dataset/ETHPy150Open spulec/moto/tests/test_redshift/test_redshift.py test_create_cluster/VarMisuse@27/47 `conn`->`cluster_identifier`