22
33from localstack .testing .pytest import markers
44
5+ THIS_FOLDER = os .path .dirname (__file__ )
6+
57
68@markers .aws .unknown
79def test_vpc_creates_default_sg (deploy_cfn_template , aws_client ):
810 result = deploy_cfn_template (
9- template_path = os .path .join (
10- os .path .dirname (__file__ ), "../../../templates/ec2_vpc_default_sg.yaml"
11- )
11+ template_path = os .path .join (THIS_FOLDER , "../../../templates/ec2_vpc_default_sg.yaml" )
1212 )
1313
1414 vpc_id = result .outputs .get ("VpcId" )
@@ -32,7 +32,7 @@ def test_vpc_creates_default_sg(deploy_cfn_template, aws_client):
3232def test_cfn_with_multiple_route_tables (deploy_cfn_template , aws_client ):
3333
3434 result = deploy_cfn_template (
35- template_path = os .path .join (os . path . dirname ( __file__ ) , "../../../templates/template36.yaml" ),
35+ template_path = os .path .join (THIS_FOLDER , "../../../templates/template36.yaml" ),
3636 max_wait = 180 ,
3737 )
3838 vpc_id = result .outputs ["VPC" ]
@@ -47,7 +47,7 @@ def test_cfn_with_multiple_route_tables(deploy_cfn_template, aws_client):
4747def test_cfn_with_multiple_route_table_associations (deploy_cfn_template , aws_client ):
4848 # TODO: stack does not deploy to AWS
4949 stack = deploy_cfn_template (
50- template_path = os .path .join (os . path . dirname ( __file__ ) , "../../../templates/template37.yaml" )
50+ template_path = os .path .join (THIS_FOLDER , "../../../templates/template37.yaml" )
5151 )
5252 route_table_id = stack .outputs ["RouteTable" ]
5353 route_table = aws_client .ec2 .describe_route_tables (
@@ -72,9 +72,7 @@ def test_cfn_with_multiple_route_table_associations(deploy_cfn_template, aws_cli
7272@markers .snapshot .skip_snapshot_verify (paths = ["$..DriftInformation" , "$..Metadata" ])
7373def test_internet_gateway_ref_and_attr (deploy_cfn_template , snapshot , aws_client ):
7474 stack = deploy_cfn_template (
75- template_path = os .path .join (
76- os .path .dirname (__file__ ), "../../../templates/internet_gateway.yml"
77- )
75+ template_path = os .path .join (THIS_FOLDER , "../../../templates/internet_gateway.yml" )
7876 )
7977
8078 response = aws_client .cloudformation .describe_stack_resource (
0 commit comments