Skip to content

Commit 96735c4

Browse files
authored
chore: Add missing import and add partition into base test for integration test (#139)
* Manual sync from public * Formatting
1 parent 919d340 commit 96735c4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

integration/combination/test_api_with_authorizer_apikey.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ def test_authorizer_apikey(self):
1919
apigw_client = self.client_provider.api_client
2020

2121
authorizers = apigw_client.get_authorizers(restApiId=rest_api_id)["items"]
22-
lambda_authorizer_uri = (
23-
"arn:aws:apigateway:"
24-
+ self.my_region
25-
+ ":lambda:path/2015-03-31/functions/"
26-
+ stack_outputs["AuthorizerFunctionArn"]
27-
+ "/invocations"
22+
23+
lambda_authorizer_uri = "arn:{}:apigateway:{}:lambda:path/2015-03-31/functions/{}/invocations".format(
24+
self.partition, self.my_region, stack_outputs["AuthorizerFunctionArn"]
2825
)
2926

3027
lambda_token_authorizer = get_authorizer_by_name(authorizers, "MyLambdaTokenAuth")

integration/combination/test_function_with_self_managed_kafka.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from unittest.case import skipIf
12
import pytest
23

34
from integration.helpers.base_test import BaseTest

integration/helpers/base_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def setUpClass(cls):
7272
cls.code_dir = Path(cls.resources_dir, "code")
7373
cls.session = boto3.session.Session()
7474
cls.my_region = cls.session.region_name
75+
cls.partition = cls.session.get_partition_for_region(cls.my_region)
7576
cls.client_provider = ClientProvider()
7677
cls.file_to_s3_uri_map = read_test_config_file("file_to_s3_map_modified.json")
7778
cls.code_key_to_file = read_test_config_file("code_key_to_file_map.json")

0 commit comments

Comments
 (0)