Skip to content

Commit c8180ed

Browse files
committed
fix: resolve isort duplicate import and add missing live_request_queue argument in test
- Remove duplicate LiveRequestQueue import caused by merge conflict - Fix import ordering for tests.unittests module - Add required live_request_queue argument to test_new_invocation_context_for_live_with_metadata test
1 parent 8bebbee commit c8180ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unittests/test_runners.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
from google.adk.agents.base_agent import BaseAgent
2424
from google.adk.agents.context_cache_config import ContextCacheConfig
25-
from google.adk.agents.live_request_queue import LiveRequestQueue
2625
from google.adk.agents.invocation_context import InvocationContext
2726
from google.adk.agents.live_request_queue import LiveRequestQueue
2827
from google.adk.agents.llm_agent import LlmAgent
@@ -37,12 +36,13 @@
3736
from google.adk.plugins.base_plugin import BasePlugin
3837
from google.adk.runners import Runner
3938
from google.adk.sessions.in_memory_session_service import InMemorySessionService
40-
from tests.unittests import testing_utils
4139
from google.adk.sessions.session import Session
4240
from google.adk.tools.function_tool import FunctionTool
4341
from google.genai import types
4442
import pytest
4543

44+
from tests.unittests import testing_utils
45+
4646
TEST_APP_ID = "test_app"
4747
TEST_USER_ID = "test_user"
4848
TEST_SESSION_ID = "test_session"
@@ -1579,8 +1579,9 @@ def test_new_invocation_context_for_live_with_metadata(self):
15791579
)
15801580

15811581
test_metadata = {"user_id": "live_user", "trace_id": "live_trace"}
1582+
live_queue = LiveRequestQueue()
15821583
invocation_context = self.runner._new_invocation_context_for_live(
1583-
mock_session, metadata=test_metadata
1584+
mock_session, live_request_queue=live_queue, metadata=test_metadata
15841585
)
15851586

15861587
assert invocation_context.metadata == test_metadata

0 commit comments

Comments
 (0)