Skip to content

Commit f83e1c5

Browse files
committed
fix: rolled back test changes
1 parent 8883e33 commit f83e1c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/functional/event_handler/test_api_gateway.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def test_override_route_compress_parameter():
367367
# AND the Response object with compress=False
368368
app = ApiGatewayResolver()
369369
mock_event = {"path": "/my/request", "httpMethod": "GET", "headers": {"Accept-Encoding": "deflate, gzip"}}
370-
expected_value = {"test": "value"}
370+
expected_value = '{"test": "value"}'
371371

372372
@app.get("/my/request", compress=True)
373373
def with_compression() -> Response:
@@ -381,7 +381,7 @@ def handler(event, context):
381381

382382
# THEN the response is not compressed
383383
assert result["isBase64Encoded"] is False
384-
assert json.loads(result["body"]) == expected_value
384+
assert result["body"] == expected_value
385385
assert result["multiValueHeaders"].get("Content-Encoding") is None
386386

387387

@@ -1778,11 +1778,11 @@ def test_route_match_prioritize_full_match():
17781778

17791779
@router.get("/my/{path}")
17801780
def dynamic_handler() -> Response:
1781-
return Response(200, content_types.APPLICATION_JSON, {"hello": "dynamic"})
1781+
return Response(200, content_types.APPLICATION_JSON, json.dumps({"hello": "dynamic"}))
17821782

17831783
@router.get("/my/path")
17841784
def static_handler() -> Response:
1785-
return Response(200, content_types.APPLICATION_JSON, {"hello": "static"})
1785+
return Response(200, content_types.APPLICATION_JSON, json.dumps({"hello": "static"}))
17861786

17871787
app.include_router(router)
17881788

0 commit comments

Comments
 (0)