Skip to content

Commit e4c5821

Browse files
author
Michael Brewer
committed
tests: Add a real world example
1 parent a00747e commit e4c5821

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/functional/data_classes/test_api_gateway_authorizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ def test_authorizer_response_allow_route_with_underscore(builder: APIGatewayAuth
201201
def test_parse_api_gateway_arn_with_resource():
202202
mock_event = {
203203
"type": "TOKEN",
204-
"authorizationToken": "allow",
205-
"methodArn": "arn:aws:execute-api:us-west-2:123456789012:ymy8tbxw7b/*/GET/foo/bar",
204+
"methodArn": "arn:aws:execute-api:us-east-2:1234567890:abcd1234/latest/GET/path/part/part/1",
205+
"authorizationToken": "Bearer TOKEN",
206206
}
207207
event = APIGatewayAuthorizerTokenEvent(mock_event)
208208
event_arn = event.parsed_arn
209-
assert "foo/bar" == event_arn.resource
209+
assert event_arn.resource == "path/part/part/1"
210210

211211
authorizer_policy = APIGatewayAuthorizerResponse(
212212
principal_id="fooPrinciple",

0 commit comments

Comments
 (0)