Skip to content

Commit e80630e

Browse files
committed
fix: add a unit test
1 parent 899e18b commit e80630e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_workflow.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@ def test_start_workflow_not_found(self, mock_parent_agent):
247247
assert result["status"] == "error"
248248
assert "not found" in result["content"][0]["text"]
249249

250+
def test_task_id_namespacing(self):
251+
"""Test task ID namespacing and extraction logic."""
252+
workflow_id = "test_workflow"
253+
task_id = "task1"
254+
255+
namespaced_task_id = f"{workflow_id}:{task_id}"
256+
assert namespaced_task_id == "test_workflow:task1"
257+
258+
extracted_id = namespaced_task_id.split(":", 1)[1] if ":" in namespaced_task_id else namespaced_task_id
259+
assert extracted_id == "task1"
260+
250261

251262
class TestWorkflowStatus:
252263
"""Test workflow status functionality."""

0 commit comments

Comments
 (0)