File size: 669 Bytes
d8ad0fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import pytest
from requests import Request
from tests.e2e.utils import data_fetcher
@pytest.fixture
def apigw_rest_endpoint(infrastructure: dict) -> str:
return infrastructure.get("APIGatewayRestUrl", "")
@pytest.mark.xdist_group(name="event_handler")
def test_get_openapi_schema(apigw_rest_endpoint):
# GIVEN
url = f"{apigw_rest_endpoint}openapi_schema"
# WHEN
response = data_fetcher.get_http_response(
Request(
method="GET",
url=url,
),
)
assert "Powertools e2e API" in response.text
assert "x-amazon-apigateway-gateway-responses" in response.text
assert response.status_code == 200
|