Skip to content

Commit dc23c1a

Browse files
committed
fix tests
1 parent 18d325e commit dc23c1a

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

tests/aws/services/apigateway/test_apigateway_lambda.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ def handler(event, context, *args):
5959

6060

6161
@markers.aws.validated
62-
@markers.snapshot.skip_snapshot_verify(paths=CLOUDFRONT_SKIP_HEADERS)
62+
@markers.snapshot.skip_snapshot_verify(
63+
paths=CLOUDFRONT_SKIP_HEADERS
64+
+ [
65+
# The value of Accept-Encoding can change when the zstandard package is present
66+
"$..headers.Accept-Encoding",
67+
"$..multiValueHeaders.Accept-Encoding",
68+
]
69+
)
6370
@markers.snapshot.skip_snapshot_verify(
6471
condition=lambda: not is_next_gen_api(),
6572
paths=[
@@ -72,9 +79,6 @@ def handler(event, context, *args):
7279
"$..accept-encoding",
7380
"$..x-localstack-edge",
7481
"$..pathParameters",
75-
# The value of Accept-Encoding can change when the zstandard package is present
76-
"$..headers.Accept-Encoding",
77-
"$..multiValueHeaders.Accept-Encoding",
7882
"$..requestContext.authorizer",
7983
"$..requestContext.deploymentId",
8084
"$..requestContext.domainName",
@@ -1247,7 +1251,14 @@ def _invoke_url(url):
12471251

12481252

12491253
@markers.aws.validated
1250-
@markers.snapshot.skip_snapshot_verify(paths=CLOUDFRONT_SKIP_HEADERS)
1254+
@markers.snapshot.skip_snapshot_verify(
1255+
paths=CLOUDFRONT_SKIP_HEADERS
1256+
+ [
1257+
# The value of Accept-Encoding can change when the zstandard package is present
1258+
"$..content.headers.Accept-Encoding",
1259+
"$..content.multiValueHeaders.Accept-Encoding",
1260+
]
1261+
)
12511262
@markers.snapshot.skip_snapshot_verify(
12521263
condition=lambda: not is_next_gen_api(),
12531264
paths=[
@@ -1262,9 +1273,6 @@ def _invoke_url(url):
12621273
"$..User-Agent",
12631274
"$..x-localstack-edge",
12641275
"$..pathParameters",
1265-
# The value of Accept-Encoding can change when the zstandard package is present
1266-
"$..content.headers.Accept-Encoding",
1267-
"$..content.multiValueHeaders.Accept-Encoding",
12681276
"$..requestContext.authorizer",
12691277
"$..requestContext.deploymentId",
12701278
"$..requestContext.domainName",

tests/aws/services/lambda_/test_lambda.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ def test_lambda_url_non_existing_url(self):
14081408
"$..headers.x-amzn-trace-id",
14091409
"$..origin", # TODO: LS Lambda should populate this value for AWS parity
14101410
# The value of Accept-Encoding can change when the zstandard package is present
1411-
"$..content.headers.accept-encoding",
1411+
"$..headers.accept-encoding",
14121412
]
14131413
)
14141414
@markers.aws.validated
@@ -1443,7 +1443,7 @@ def test_lambda_url_echo_http_fixture_default(
14431443
paths=[
14441444
"$..content.headers.domain", # TODO: LS Lambda should populate this value for AWS parity
14451445
# The value of Accept-Encoding can change when the zstandard package is present
1446-
"$..content.headers.accept-encoding",
1446+
"$..headers.accept-encoding",
14471447
"$..origin", # TODO: LS Lambda should populate this value for AWS parity
14481448
]
14491449
)
@@ -1470,7 +1470,7 @@ def test_lambda_url_echo_http_fixture_trim_x_headers(
14701470
paths=[
14711471
"$..origin", # FIXME: LS does not populate the value
14721472
# The value of Accept-Encoding can change when the zstandard package is present
1473-
"$..content.headers.accept-encoding",
1473+
"$..headers.accept-encoding",
14741474
]
14751475
)
14761476
def test_lambda_url_form_payload(self, create_echo_http_server, snapshot, aws_client):

0 commit comments

Comments
 (0)