Fix:EC2 Tags in create vpc and create subnet (#3338)

Co-authored-by: usmankb <usman@krazybee.com>
This commit is contained in:
usmangani1 2020-09-27 13:54:17 +05:30 committed by GitHub
commit 55e7caccfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 2 deletions

View file

@ -680,6 +680,19 @@ def test_create_vpc_with_invalid_cidr_range():
)
@mock_ec2
def test_create_vpc_with_tags():
ec2 = boto3.resource("ec2", region_name="us-west-1")
# Create VPC
vpc = ec2.create_vpc(
CidrBlock="10.0.0.0/16",
TagSpecifications=[
{"ResourceType": "vpc", "Tags": [{"Key": "name", "Value": "some-vpc"}]}
],
)
assert vpc.tags == [{"Key": "name", "Value": "some-vpc"}]
@mock_ec2
def test_enable_vpc_classic_link():
ec2 = boto3.resource("ec2", region_name="us-west-1")