Skip to content

Commit 5a6da99

Browse files
committed
address nits
1 parent 6421bf2 commit 5a6da99

File tree

1 file changed

+4
-7
lines changed
  • localstack-core/localstack/services/apigateway/next_gen/execute_api

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,6 @@ def create_test_invocation_context(
164164
return invocation_context
165165

166166

167-
def _fix_headers(headers: Headers) -> Headers:
168-
headers.remove("Content-Length")
169-
170-
return headers
171-
172-
173167
def run_test_invocation(
174168
test_request: TestInvokeMethodRequest, deployment: RestApiDeployment
175169
) -> TestInvokeMethodResponse:
@@ -193,7 +187,10 @@ def run_test_invocation(
193187
test_chain.handle(context=invocation_context, response=test_response)
194188
end_time = datetime.datetime.now()
195189

196-
response_headers = _fix_headers(test_response.headers.copy())
190+
response_headers = test_response.headers.copy()
191+
# AWS does not return the Content-Length for TestInvokeMethod
192+
response_headers.remove("Content-Length")
193+
197194
log = log_template(invocation_context, response_headers)
198195

199196
headers = dict(response_headers)

0 commit comments

Comments
 (0)