#NEWLINE# @ disable_on_py3 ( ) #NEWLINE# @ mock_ec2 #NEWLINE# @ mock_rds2 #NEWLINE# def test_create_database_in_subnet_group( ) : #NEWLINE# #INDENT# vpc_conn = boto . vpc . connect_to_region ( 'us-west-2' ) #NEWLINE# vpc = vpc_conn . create_vpc ( '10.0.0.0/16' ) #NEWLINE# subnet = vpc_conn . create_subnet ( vpc . id , '10.1.0.0/24' ) #NEWLINE# conn = boto . rds2 . connect_to_region ( 'us-west-2' ) #NEWLINE# conn . create_db_subnet_group ( 'db_subnet1' , 'my db subnet' , [ subnet . id ] ) #NEWLINE# conn . create_db_instance ( db_instance_identifier = 'db-master-1' , allocated_storage = 10 , engine = 'postgres' , db_instance_class = 'db.m1.small' , master_username = 'root' , master_user_password = 'hunter2' , db_subnet_group_name = 'db_subnet1' ) #NEWLINE# result = conn . describe_db_instances ( 'db-master-1' ) #NEWLINE# result [ 'DescribeDBInstancesResponse' ] [ 'DescribeDBInstancesResult' ] [ 'DBInstances' ] [ 0 ] [ 'DBSubnetGroup' ] [ 'DBSubnetGroupName' ] . should . equal ( 'db_subnet1' )