Skip to content

Commit a67598d

Browse files
Potential fix for code scanning alert no. 1030: Unused import
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent fc3573f commit a67598d

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

qa/L0_http/generate_endpoint_test.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,23 @@ def test_invalid_input_types(self):
275275
self.generate_expect_failure(self._model_name, inputs, error_msg)
276276
self.generate_stream_expect_failure(self._model_name, inputs, error_msg)
277277

278-
# def test_type_size_explosion(self):
279-
# input_data = [1] * (
280-
# 64 * 1024 * 1024
281-
# ) # 64MB input, which is large but still reasonable for HTTP request body
282-
# input_bytes = bytes(input_data)
283-
# input_str = base64.b64encode(input_bytes).decode("utf-8")
284-
# inputs = {"PROMPT": input_str, "STREAM": False}
285-
# error_msg = "Request JSON size of 67108864 + 22369655 bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
286-
# self.generate_expect_failure(self._model_name, inputs, error_msg)
287-
288-
# inputs = {
289-
# "INPUT0": input_str[0 : (len(input_str) // 2)],
290-
# "INPUT1": input_str[(len(input_str) // 2) :],
291-
# "STREAM": False,
292-
# }
293-
# error_msg = "Request JSON size of 67108864 + 22369669 bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
294-
# self.generate_expect_failure(self._model_name, inputs, error_msg)
278+
def test_type_size_explosion(self):
279+
input_data = [1] * (
280+
64 * 1024 * 1024
281+
) # 64MB input, which is large but still reasonable for HTTP request body
282+
input_bytes = bytes(input_data)
283+
input_str = base64.b64encode(input_bytes).decode("utf-8")
284+
inputs = {"PROMPT": input_str, "STREAM": False}
285+
error_msg = "Request JSON size of 67108864 + 22369655 bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
286+
self.generate_expect_failure(self._model_name, inputs, error_msg)
287+
288+
inputs = {
289+
"INPUT0": input_str[0 : (len(input_str) // 2)],
290+
"INPUT1": input_str[(len(input_str) // 2) :],
291+
"STREAM": False,
292+
}
293+
error_msg = "Request JSON size of 67108864 + 22369669 bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
294+
self.generate_expect_failure(self._model_name, inputs, error_msg)
295295

296296
def test_duplicate_inputs(self):
297297
dupe_prompt = "input 'PROMPT' already exists in request"

0 commit comments

Comments
 (0)