Skip to content

Commit 6da7fc9

Browse files
Translate PDF live test: Fix expected field name
Assisted-by: Codex
1 parent 12cb4b1 commit 6da7fc9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/pdfrest/models/public.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class TranslatePdfTextResponse(BaseModel):
344344

345345
model_config = ConfigDict(extra="allow")
346346

347-
translation: Annotated[
347+
translated_text: Annotated[
348348
str | None,
349349
Field(
350350
description="Inline translation content when output_type is json.",

tests/live/test_live_translate_pdf_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_live_translate_pdf_text_success(
2525
)
2626

2727
assert isinstance(response, TranslatePdfTextResponse)
28-
assert response.translation
28+
assert response.translated_text
2929
assert response.input_id == uploaded.id
3030

3131

tests/test_translate_pdf_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def handler(request: httpx.Request) -> httpx.Response:
103103

104104
assert seen == {"post": 1}
105105
assert isinstance(response, TranslatePdfTextResponse)
106-
assert response.translation == "Bonjour"
106+
assert response.translated_text == "Bonjour"
107107
assert response.input_id == input_file.id
108108
assert response.output_id is None
109109
assert response.output_url is None
@@ -205,5 +205,5 @@ def handler(request: httpx.Request) -> httpx.Response:
205205

206206
assert seen == {"post": 1}
207207
assert isinstance(response, TranslatePdfTextResponse)
208-
assert response.translation == "Hallo"
208+
assert response.translated_text == "Hallo"
209209
assert response.input_id == input_file.id

0 commit comments

Comments
 (0)