Skip to content

Commit aaae5da

Browse files
fix: update tests to match new logging levels from PR #49
Tests were failing after PR #49 changed ADK Event logging from info to debug level. Updated test_event_translator_comprehensive.py to expect the correct log levels: - test_translate_function_calls_detection now checks for debug message in all debug calls - test_event_logging_coverage now looks for "ADK Event:" in debug logs instead of info logs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c1596c9 commit aaae5da

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

typescript-sdk/integrations/adk-middleware/tests/test_event_translator_comprehensive.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ async def test_translate_function_calls_detection(self, translator, mock_adk_eve
101101
async for event in translator.translate(mock_adk_event, "thread_1", "run_1"):
102102
events.append(event)
103103

104-
# Should log function calls detection
105-
mock_logger.debug.assert_called_once_with("ADK function calls detected: 1 calls")
104+
# Should log function calls detection (along with the ADK Event debug log)
105+
debug_calls = [str(call) for call in mock_logger.debug.call_args_list]
106+
assert any("ADK function calls detected: 1 calls" in call for call in debug_calls)
106107

107108
@pytest.mark.asyncio
108109
async def test_translate_function_responses_handling(self, translator, mock_adk_event):
@@ -690,10 +691,14 @@ async def test_event_logging_coverage(self, translator, mock_adk_event_with_cont
690691
async for event in translator.translate(mock_adk_event_with_content, "thread_1", "run_1"):
691692
events.append(event)
692693

693-
# Should log ADK event processing
694+
# Should log ADK event processing (now in debug logs)
695+
mock_logger.debug.assert_called()
696+
debug_calls = [str(call) for call in mock_logger.debug.call_args_list]
697+
assert any("ADK Event:" in call for call in debug_calls)
698+
699+
# Text event logging remains in info
694700
mock_logger.info.assert_called()
695701
info_calls = [str(call) for call in mock_logger.info.call_args_list]
696-
assert any("ADK Event:" in call for call in info_calls)
697702
assert any("Text event -" in call for call in info_calls)
698703
assert any("TEXT_MESSAGE_START:" in call for call in info_calls)
699704
assert any("TEXT_MESSAGE_CONTENT:" in call for call in info_calls)

0 commit comments

Comments
 (0)