Skip to content

Commit ff18519

Browse files
committed
fix tests
1 parent 209c87f commit ff18519

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

localstack-core/localstack/services/apigateway/next_gen/execute_api/router.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def __init__(self, rest_gateway: RestApiGateway = None, store: ApiGatewayStore =
2727
def __call__(self, request: Request, **kwargs) -> Response:
2828
# api_id can be cased because of custom-tag id
2929
api_id, stage = kwargs.get("api_id", "").lower(), kwargs.get("stage")
30-
print(f"{api_id=} / {stage=}")
3130
if self.is_rest_api(api_id, stage):
3231
LOG.info("Next-gen handler for APIGW v1 called")
3332
response = Response()

tests/aws/services/apigateway/test_apigateway_basic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@ def test_api_mock_integration_response_params(self, aws_client):
12621262
aws_client.dynamodb,
12631263
integration_type="MOCK",
12641264
integration_responses=resps,
1265+
stage_name=TEST_STAGE_NAME,
12651266
)
12661267

12671268
url = path_based_url(api_id=api_id, stage_name=TEST_STAGE_NAME, path="/")

tests/integration/test_security.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def test_cors_apigw_not_applied(self, aws_client):
178178
"Origin": "https://app.localstack.cloud",
179179
},
180180
)
181-
assert response.status_code == 404
181+
assert response.status_code in (403, 404)
182182
assert not any(response.headers.get(cors_header) for cors_header in cors_headers)
183183

184184
rest_api_url_host = f"{config.internal_service_url()}/stage"
@@ -192,7 +192,7 @@ def test_cors_apigw_not_applied(self, aws_client):
192192
},
193193
)
194194

195-
assert response.status_code == 404
195+
assert response.status_code in (403, 404)
196196
assert not any(response.headers.get(cors_header) for cors_header in cors_headers)
197197

198198
# now we give it a try with a route from the provider defined in the specs: GetRestApi, and an authorized origin

0 commit comments

Comments
 (0)