From 27efba27c058cef2a0554edab531e49df72be9eb Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Thu, 2 May 2024 09:31:22 -0700 Subject: [PATCH] Update tests --- tests/test_pregel.py | 9 +++++++++ tests/test_pregel_async.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/tests/test_pregel.py b/tests/test_pregel.py index 5aac3541b..f477d4988 100644 --- a/tests/test_pregel.py +++ b/tests/test_pregel.py @@ -428,6 +428,7 @@ def test_invoke_two_processes_in_dict_out(mocker: MockerFixture) -> None: "step": 0, "payload": { "id": "7a3cc398-2e02-5023-ad7b-e4848d3b67fa", + "name": "one", "result": [("inbox", 3)], }, }, @@ -437,6 +438,7 @@ def test_invoke_two_processes_in_dict_out(mocker: MockerFixture) -> None: "step": 0, "payload": { "id": "34e90af0-f97e-54e0-a159-691da37f175f", + "name": "two", "result": [("output", 13)], }, }, @@ -463,6 +465,7 @@ def test_invoke_two_processes_in_dict_out(mocker: MockerFixture) -> None: "step": 1, "payload": { "id": "cf7cf374-2a2a-556f-8561-91737af89d2f", + "name": "two", "result": [("output", 4)], }, }, @@ -3529,6 +3532,7 @@ def test_branch_then(snapshot: SnapshotAssertion, checkpoint_at: CheckpointAt) - "step": 1, "payload": { "id": "e7879e70-6335-5867-9ec6-957fbb3da6fa", + "name": "prepare", "result": [("my_key", " prepared")], }, }, @@ -3558,6 +3562,7 @@ def test_branch_then(snapshot: SnapshotAssertion, checkpoint_at: CheckpointAt) - "step": 2, "payload": { "id": "122f31bd-0e14-5b8f-91e7-4f241047a3fd", + "name": "tool_two_slow", "result": [("my_key", " slow")], }, }, @@ -3587,6 +3592,7 @@ def test_branch_then(snapshot: SnapshotAssertion, checkpoint_at: CheckpointAt) - "step": 3, "payload": { "id": "48a16051-2c14-5ff5-9cfe-e8c7c32d5c83", + "name": "finish", "result": [("my_key", " finished")], }, }, @@ -3654,6 +3660,7 @@ def test_branch_then(snapshot: SnapshotAssertion, checkpoint_at: CheckpointAt) - "step": 1, "payload": { "id": "e7879e70-6335-5867-9ec6-957fbb3da6fa", + "name": "prepare", "result": [("my_key", " prepared")], }, }, @@ -3685,6 +3692,7 @@ def test_branch_then(snapshot: SnapshotAssertion, checkpoint_at: CheckpointAt) - "step": 2, "payload": { "id": "122f31bd-0e14-5b8f-91e7-4f241047a3fd", + "name": "tool_two_slow", "result": [("my_key", " slow")], }, }, @@ -3716,6 +3724,7 @@ def test_branch_then(snapshot: SnapshotAssertion, checkpoint_at: CheckpointAt) - "step": 3, "payload": { "id": "48a16051-2c14-5ff5-9cfe-e8c7c32d5c83", + "name": "finish", "result": [("my_key", " finished")], }, }, diff --git a/tests/test_pregel_async.py b/tests/test_pregel_async.py index ff099b3e2..ffb7d8159 100644 --- a/tests/test_pregel_async.py +++ b/tests/test_pregel_async.py @@ -410,6 +410,7 @@ async def test_invoke_two_processes_in_dict_out(mocker: MockerFixture) -> None: "step": 0, "payload": { "id": "7a3cc398-2e02-5023-ad7b-e4848d3b67fa", + "name": "one", "result": [("inbox", 3)], }, }, @@ -419,6 +420,7 @@ async def test_invoke_two_processes_in_dict_out(mocker: MockerFixture) -> None: "step": 0, "payload": { "id": "34e90af0-f97e-54e0-a159-691da37f175f", + "name": "two", "result": [("output", 13)], }, }, @@ -445,6 +447,7 @@ async def test_invoke_two_processes_in_dict_out(mocker: MockerFixture) -> None: "step": 1, "payload": { "id": "cf7cf374-2a2a-556f-8561-91737af89d2f", + "name": "two", "result": [("output", 4)], }, }, @@ -3064,6 +3067,7 @@ async def test_branch_then( "step": 1, "payload": { "id": "e7879e70-6335-5867-9ec6-957fbb3da6fa", + "name": "prepare", "result": [("my_key", " prepared")], }, }, @@ -3093,6 +3097,7 @@ async def test_branch_then( "step": 2, "payload": { "id": "122f31bd-0e14-5b8f-91e7-4f241047a3fd", + "name": "tool_two_slow", "result": [("my_key", " slow")], }, }, @@ -3122,6 +3127,7 @@ async def test_branch_then( "step": 3, "payload": { "id": "48a16051-2c14-5ff5-9cfe-e8c7c32d5c83", + "name": "finish", "result": [("my_key", " finished")], }, }, @@ -3190,6 +3196,7 @@ async def test_branch_then( "step": 1, "payload": { "id": "e7879e70-6335-5867-9ec6-957fbb3da6fa", + "name": "prepare", "result": [("my_key", " prepared")], }, }, @@ -3221,6 +3228,7 @@ async def test_branch_then( "step": 2, "payload": { "id": "122f31bd-0e14-5b8f-91e7-4f241047a3fd", + "name": "tool_two_slow", "result": [("my_key", " slow")], }, }, @@ -3252,6 +3260,7 @@ async def test_branch_then( "step": 3, "payload": { "id": "48a16051-2c14-5ff5-9cfe-e8c7c32d5c83", + "name": "finish", "result": [("my_key", " finished")], }, },