Add tagging to all applicable EC2 objects. Closes #66.
This commit is contained in:
parent
06481ebe7e
commit
955b4c6c4a
9 changed files with 159 additions and 22 deletions
|
|
@ -21,3 +21,21 @@ def test_subnets():
|
|||
|
||||
conn.delete_subnet.when.called_with(
|
||||
subnet.id).should.throw(EC2ResponseError)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_subnet_tagging():
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
subnet = conn.create_subnet(vpc.id, "10.0.0.0/18")
|
||||
|
||||
subnet.add_tag("a key", "some value")
|
||||
|
||||
tag = conn.get_all_tags()[0]
|
||||
tag.name.should.equal("a key")
|
||||
tag.value.should.equal("some value")
|
||||
|
||||
# Refresh the subnet
|
||||
subnet = conn.get_all_subnets()[0]
|
||||
subnet.tags.should.have.length_of(1)
|
||||
subnet.tags["a key"].should.equal("some value")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue