Skip to content

Commit 4afa8bf

Browse files
Assert workflow task history response contract
Assert workflow task history response contract
1 parent a7b8682 commit 4afa8bf

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

tests/fixtures/control-plane/workflow-task-history-parity.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"workflow_task_attempt": 2,
1818
"next_history_page_token": "history-page-2",
1919
"total_history_events": 4,
20-
"next_history_page_token_response": "history-page-3"
20+
"response_next_history_page_token": "history-page-3"
2121
},
2222
"response_body": {
2323
"history_events": [

tests/test_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,12 @@ async def test_workflow_task_history_matches_polyglot_fixture(self, client: Clie
14851485
page = await client.workflow_task_history(**fixture["sdk_python"]["kwargs"])
14861486

14871487
assert page == fixture["response_body"]
1488-
assert page["next_history_page_token"] == fixture["semantic_body"]["next_history_page_token_response"]
1488+
assert "history_events" in page
1489+
assert "total_history_events" in page
1490+
assert "next_history_page_token" in page
1491+
assert "events" not in page
1492+
assert "next_page_token" not in page
1493+
assert page["next_history_page_token"] == fixture["semantic_body"]["response_next_history_page_token"]
14891494
assert mock.call_args.args[:2] == (fixture["request"]["method"], f"/api{fixture['request']['path']}")
14901495
assert mock.call_args.kwargs["json"] == fixture["request"]["body"]
14911496

0 commit comments

Comments
 (0)