Skip to content

Commit 6992ea0

Browse files
committed
Python: narrow activity snapshots in workflow regression tests
1 parent fcece68 commit 6992ea0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎python/packages/ag-ui/tests/ag_ui/test_workflow_run.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from typing import Any, cast
1313

1414
import pytest
15-
from ag_ui.core import EventType, RunFinishedEvent, RunStartedEvent, StateSnapshotEvent
15+
from ag_ui.core import ActivitySnapshotEvent, EventType, RunFinishedEvent, RunStartedEvent, StateSnapshotEvent
1616
from agent_framework import (
1717
Agent,
1818
AgentContext,
@@ -3079,7 +3079,7 @@ async def stream() -> AsyncIterator[Any]:
30793079
cast(Any, ActivityWorkflow()),
30803080
)
30813081
]
3082-
activities = [event for event in events if event.type == EventType.ACTIVITY_SNAPSHOT]
3082+
activities = [event for event in events if isinstance(event, ActivitySnapshotEvent)]
30833083
assert len(activities) == 4
30843084
assert activities[0].message_id == activities[1].message_id
30853085
assert activities[2].message_id == activities[3].message_id
@@ -3119,7 +3119,7 @@ async def stream() -> AsyncIterator[Any]:
31193119
cast(Any, ActivityWorkflow(executor_id)),
31203120
)
31213121
]
3122-
activities = [event for event in events if event.type == EventType.ACTIVITY_SNAPSHOT]
3122+
activities = [event for event in events if isinstance(event, ActivitySnapshotEvent)]
31233123
assert len(activities) == 1
31243124
message_ids.append(activities[0].message_id)
31253125

0 commit comments

Comments
 (0)