@@ -367,7 +367,7 @@ def test_override_route_compress_parameter():
367
367
# AND the Response object with compress=False
368
368
app = ApiGatewayResolver ()
369
369
mock_event = {"path" : "/my/request" , "httpMethod" : "GET" , "headers" : {"Accept-Encoding" : "deflate, gzip" }}
370
- expected_value = {"test" : "value" }
370
+ expected_value = ' {"test": "value"}'
371
371
372
372
@app .get ("/my/request" , compress = True )
373
373
def with_compression () -> Response :
@@ -381,7 +381,7 @@ def handler(event, context):
381
381
382
382
# THEN the response is not compressed
383
383
assert result ["isBase64Encoded" ] is False
384
- assert json . loads ( result ["body" ]) == expected_value
384
+ assert result ["body" ] == expected_value
385
385
assert result ["multiValueHeaders" ].get ("Content-Encoding" ) is None
386
386
387
387
@@ -1778,11 +1778,11 @@ def test_route_match_prioritize_full_match():
1778
1778
1779
1779
@router .get ("/my/{path}" )
1780
1780
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" }) )
1782
1782
1783
1783
@router .get ("/my/path" )
1784
1784
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" }) )
1786
1786
1787
1787
app .include_router (router )
1788
1788
0 commit comments