Skip to content

Commit 5aca8b3

Browse files
test(adk): restore SystemMessage between tests
1 parent 01cab61 commit 5aca8b3

File tree

1 file changed

+20
-0
lines changed
  • typescript-sdk/integrations/adk-middleware/python/tests

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Shared pytest fixtures for ADK middleware tests."""
2+
3+
from __future__ import annotations
4+
5+
import pytest
6+
7+
from ag_ui.core import SystemMessage as CoreSystemMessage
8+
9+
import ag_ui_adk.adk_agent as adk_agent_module
10+
11+
12+
@pytest.fixture(autouse=True)
13+
def restore_system_message_class():
14+
"""Ensure every test starts and ends with the real SystemMessage type."""
15+
16+
adk_agent_module.SystemMessage = CoreSystemMessage
17+
try:
18+
yield
19+
finally:
20+
adk_agent_module.SystemMessage = CoreSystemMessage

0 commit comments

Comments
 (0)