fix(tests): update field for tests

Signed-off-by: Samantha Coyle <sam@diagrid.io>
This commit is contained in:
Samantha Coyle 2025-09-08 14:10:03 -05:00
parent 8601054a0b
commit 793506d3b7
No known key found for this signature in database
4 changed files with 10 additions and 10 deletions

View File

@ -587,7 +587,7 @@ class DurableAgent(AgenticWorkflow, AgentBase):
# "messages": [],
# "start_time": datetime.now(timezone.utc).isoformat(),
# "source": "workflow_start",
# "source_workflow_instance_id": None,
# "triggering_workflow_instance_id": None,
# "workflow_name": self._workflow_name,
# "dapr_status": "RUNNING",
# "suspended_reason": None
@ -597,7 +597,7 @@ class DurableAgent(AgenticWorkflow, AgentBase):
# return {
# "source": minimal_entry.get("source"),
# "source_workflow_instance_id": minimal_entry.get("source_workflow_instance_id"),
# "triggering_workflow_instance_id": minimal_entry.get("source_workflow_instance_id"),
# }
@task

View File

@ -149,7 +149,7 @@ class ServiceMixin(SignalHandlingMixin):
"messages": [],
"start_time": datetime.now(timezone.utc).isoformat(),
"source": "graceful_shutdown",
"source_workflow_instance_id": None,
"triggering_workflow_instance_id": None,
"workflow_name": getattr(self, "_workflow_name", "Unknown"),
"dapr_status": DaprWorkflowStatus.PENDING,
"suspended_reason": "app_terminated",

View File

@ -273,7 +273,7 @@ class TestDurableAgent:
] = DurableAgentWorkflowEntry(
input="Test task",
source=None,
source_workflow_instance_id="parent-instance-123",
triggering_workflow_instance_id="parent-instance-123",
)
workflow_gen = basic_durable_agent.tool_calling_workflow(
@ -288,7 +288,7 @@ class TestDurableAgent:
instance_data = basic_durable_agent.state["instances"]["test-instance-123"]
assert instance_data.input == "Test task"
assert instance_data.source is None
assert instance_data.source_workflow_instance_id == "parent-instance-123"
assert instance_data.triggering_workflow_instance_id == "parent-instance-123"
@pytest.mark.asyncio
async def test_generate_response_activity(self, basic_durable_agent):
@ -317,7 +317,7 @@ class TestDurableAgent:
instance_id: {
"input": "Test task",
"source": "test_source",
"source_workflow_instance_id": None,
"triggering_workflow_instance_id": None,
"messages": [],
"tool_history": [],
"output": None,
@ -371,7 +371,7 @@ class TestDurableAgent:
instance_id: {
"input": "Test task",
"source": "test_source",
"source_workflow_instance_id": None,
"triggering_workflow_instance_id": None,
"messages": [],
"tool_history": [],
"output": None,
@ -399,7 +399,7 @@ class TestDurableAgent:
instance_id: {
"input": "Test task",
"source": "test_source",
"source_workflow_instance_id": None,
"triggering_workflow_instance_id": None,
"messages": [],
"tool_history": [],
"output": None,

View File

@ -164,7 +164,7 @@ async def test_execute_tool_activity_with_mcp_tool(durable_agent_with_mcp_tool):
workflow_entry = DurableAgentWorkflowEntry(
input="What is 2 plus 2?",
source=None,
source_workflow_instance_id=None,
triggering_workflow_instance_id=None,
)
durable_agent_with_mcp_tool.state["instances"] = {instance_id: workflow_entry}
@ -263,7 +263,7 @@ async def test_durable_agent_with_real_server_http(start_math_server_http):
workflow_entry = DurableAgentWorkflowEntry(
input="What is 2 plus 2?",
source=None,
source_workflow_instance_id=None,
triggering_workflow_instance_id=None,
)
agent.state["instances"] = {instance_id: workflow_entry}
# Print available tool names