test(bedrock): use single quotes inside the batch-line f-strings so the file parses on Python 3.10 and 3.11

This commit is contained in:
ryan-crabbe-berri 2026-10-20 11:40:45 -07:00
parent a747990939
commit 0506e68e36

View file

@ -4488,17 +4488,17 @@ def _batch_line_with_body(field: str, value: object) -> str:
id="string-body",
),
pytest.param(
f"{_batch_line_with_body("model", 123)}\n".encode(),
f"{_batch_line_with_body('model', 123)}\n".encode(),
"Batch input file line 1 has a body.model that is not a string",
id="int-model",
),
pytest.param(
f"{_batch_line_with_body("model", None)}\n".encode(),
f"{_batch_line_with_body('model', None)}\n".encode(),
"Batch input file line 1 has a body.model that is not a string",
id="null-model",
),
pytest.param(
f"{_VALID_BATCH_LINE}\n{_batch_line_with_body("messages", "hi")}\n".encode(),
f"{_VALID_BATCH_LINE}\n{_batch_line_with_body('messages', 'hi')}\n".encode(),
"Batch input file line 2 could not be converted to a Bedrock batch record",
id="string-messages",
),