

@mock_redshift
@mock_ec2
def test_create_cluster_in_subnet_group():
    vpc_conn = boto.connect_vpc()
    vpc = vpc_conn.create_vpc('10.0.0.0/16')
    subnet = vpc_conn.create_subnet(vpc_conn.id, '10.0.0.0/24')
    redshift_conn = boto.connect_redshift()
    redshift_conn.create_cluster_subnet_group('my_subnet_group', 'This is my subnet group', subnet_ids=[subnet.id])
    redshift_conn.create_cluster('my_cluster', node_type='dw.hs1.xlarge', master_username='username', master_user_password='password', cluster_subnet_group_name='my_subnet_group')
    cluster_response = redshift_conn.describe_clusters('my_cluster')
    cluster = cluster_response['DescribeClustersResponse']['DescribeClustersResult']['Clusters'][0]
    cluster['ClusterSubnetGroupName'].should.equal('my_subnet_group')

dataset/ETHPy150Open spulec/moto/tests/test_redshift/test_redshift.py test_create_cluster_in_subnet_group/VarMisuse@38/69 `vpc`->`vpc_conn`