FIX:Ec2:Added:Tags for EIP (#3505)

* FIX:Ec2:Added:Tags for EIP

* removed files

* Fix tests
This commit is contained in:
usmangani1 2020-12-06 05:34:46 +05:30 committed by GitHub
commit cfaaa70ea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View file

@ -581,3 +581,18 @@ def test_eip_tags():
)
# Expected total is 2, one with and one without tags
len(addresses).should.equal(2)
@mock_ec2
def test_describe_addresses_tags():
client = boto3.client("ec2", region_name="us-west-1")
alloc_tags = client.allocate_address(Domain="vpc")
client.create_tags(
Resources=[alloc_tags["AllocationId"]],
Tags=[{"Key": "ManagedBy", "Value": "MyCode"}],
)
addresses_with_tags = client.describe_addresses()
assert addresses_with_tags.get("Addresses")[0].get("Tags") == [
{"Key": "ManagedBy", "Value": "MyCode"}
]