Add invalid subnet test.

This commit is contained in:
Steve Pulec 2014-11-23 23:20:02 -05:00
parent 5bbcc4505f
commit 50b80b68f0

View File

@ -6,6 +6,7 @@ from boto.redshift.exceptions import (
ClusterParameterGroupNotFound,
ClusterSecurityGroupNotFound,
ClusterSubnetGroupNotFound,
InvalidSubnet,
)
import sure # noqa
@ -305,6 +306,17 @@ def test_create_cluster_subnet_group():
set(subnet_ids).should.equal(set([subnet1.id, subnet2.id]))
@mock_redshift
@mock_ec2
def test_create_invalid_cluster_subnet_group():
redshift_conn = boto.connect_redshift()
redshift_conn.create_cluster_subnet_group.when.called_with(
"my_subnet",
"This is my subnet group",
subnet_ids=["subnet-1234"],
).should.throw(InvalidSubnet)
@mock_redshift
def test_describe_non_existant_subnet_group():
conn = boto.redshift.connect_to_region("us-east-1")