Skip to content

Commit

Permalink
tests: Add a real world example
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brewer committed Mar 1, 2022
1 parent a00747e commit e4c5821
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/functional/data_classes/test_api_gateway_authorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ def test_authorizer_response_allow_route_with_underscore(builder: APIGatewayAuth
def test_parse_api_gateway_arn_with_resource():
mock_event = {
"type": "TOKEN",
"authorizationToken": "allow",
"methodArn": "arn:aws:execute-api:us-west-2:123456789012:ymy8tbxw7b/*/GET/foo/bar",
"methodArn": "arn:aws:execute-api:us-east-2:1234567890:abcd1234/latest/GET/path/part/part/1",
"authorizationToken": "Bearer TOKEN",
}
event = APIGatewayAuthorizerTokenEvent(mock_event)
event_arn = event.parsed_arn
assert "foo/bar" == event_arn.resource
assert event_arn.resource == "path/part/part/1"

authorizer_policy = APIGatewayAuthorizerResponse(
principal_id="fooPrinciple",
Expand Down

0 comments on commit e4c5821

Please sign in to comment.