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,20 @@ def test_vpcs():
|
|||
|
||||
conn.delete_vpc.when.called_with(
|
||||
"vpc-1234abcd").should.throw(EC2ResponseError)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_vpc_tagging():
|
||||
conn = boto.connect_vpc()
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
||||
vpc.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 vpc
|
||||
vpc = conn.get_all_vpcs()[0]
|
||||
vpc.tags.should.have.length_of(1)
|
||||
vpc.tags["a key"].should.equal("some value")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue