diff --git a/src/tests/backend/common/config/test_app_config.py b/src/tests/backend/common/config/test_app_config.py index 2b310baed..95784031b 100644 --- a/src/tests/backend/common/config/test_app_config.py +++ b/src/tests/backend/common/config/test_app_config.py @@ -619,7 +619,7 @@ def test_production_environment_client_creation(self, mock_ai_client, mock_cosmo config = AppConfig() # Test credential creation uses ManagedIdentityCredential in prod - credential = config.get_azure_credential("test-client-id") + config.get_azure_credential("test-client-id") mock_managed_credential.assert_called_with(client_id="test-client-id") # Test Cosmos client creation diff --git a/src/tests/backend/common/utils/test_otlp_tracing.py b/src/tests/backend/common/utils/test_otlp_tracing.py index 586f1768b..dbf3ab244 100644 --- a/src/tests/backend/common/utils/test_otlp_tracing.py +++ b/src/tests/backend/common/utils/test_otlp_tracing.py @@ -483,7 +483,7 @@ def test_configure_oltp_tracing_call_sequence( mock_processor.return_value = mock_processor_instance # Execute - result = configure_oltp_tracing() + configure_oltp_tracing() # Verify call sequence using call order expected_calls = [ diff --git a/src/tests/backend/v4/common/services/test_team_service.py b/src/tests/backend/v4/common/services/test_team_service.py index 9aa05ed6b..c8573fe7b 100644 --- a/src/tests/backend/v4/common/services/test_team_service.py +++ b/src/tests/backend/v4/common/services/test_team_service.py @@ -219,7 +219,7 @@ def test_init_with_memory_context(self): def test_init_config_attributes(self): """Test that configuration attributes are properly set.""" - service = TeamService() + TeamService() # Verify config calls were made assert mock_config.get_azure_credentials.called @@ -922,8 +922,7 @@ async def test_validate_single_index_not_found(self): # Patch the SearchIndexClient directly on the service call with patch.object(mock_search_indexes, 'SearchIndexClient', return_value=mock_index_client): # Mock the exception handling by patching the exception in the team_service_module - original_validate = service.validate_single_index - + async def mock_validate(index_name): try: mock_index_client.get_index(index_name) diff --git a/src/tests/backend/v4/magentic_agents/test_foundry_agent.py b/src/tests/backend/v4/magentic_agents/test_foundry_agent.py index c1c6fb209..335fc3a33 100644 --- a/src/tests/backend/v4/magentic_agents/test_foundry_agent.py +++ b/src/tests/backend/v4/magentic_agents/test_foundry_agent.py @@ -934,7 +934,6 @@ async def test_close_with_azure_server_agent(self, mock_get_logger, mock_config, agent.project_client = mock_project_client # Mock the close method by setting up the agent to avoid base class call - original_close = agent.close agent.close = AsyncMock() # Override close to simulate the actual behavior but avoid base class issues diff --git a/src/tests/backend/v4/magentic_agents/test_proxy_agent.py b/src/tests/backend/v4/magentic_agents/test_proxy_agent.py index e5c7b1710..2081f35b0 100644 --- a/src/tests/backend/v4/magentic_agents/test_proxy_agent.py +++ b/src/tests/backend/v4/magentic_agents/test_proxy_agent.py @@ -125,15 +125,6 @@ def test_timeout_and_error_scenarios(self): """Test timeout and error handling scenarios.""" import asyncio - async def simulate_timeout_behavior(): - """Simulate the timeout behavior from _wait_for_user_clarification.""" - timeout_duration = 30 # seconds - try: - # Simulate waiting for user response that times out - await asyncio.wait_for(asyncio.sleep(100), timeout=timeout_duration) - return "Got response" - except asyncio.TimeoutError: - return "TIMEOUT_OCCURRED" # Test that timeout logic would work loop = asyncio.new_event_loop() @@ -339,6 +330,7 @@ async def simulate_send_clarification_request(request, timeout=30): "data": request, "timestamp": "2024-01-01T00:00:00Z" } + logging.debug("Simulated websocket message dispatch: %s", message) # Simulate waiting for response with timeout try: diff --git a/src/tests/backend/v4/orchestration/test_human_approval_manager.py b/src/tests/backend/v4/orchestration/test_human_approval_manager.py index 2b273c1b2..177efab2b 100644 --- a/src/tests/backend/v4/orchestration/test_human_approval_manager.py +++ b/src/tests/backend/v4/orchestration/test_human_approval_manager.py @@ -687,7 +687,7 @@ async def test_create_progress_ledger_websocket_error(self): # Execute - should handle the error gracefully but still raise it with self.assertRaises(Exception) as cm: - ledger = await self.manager.create_progress_ledger(context) + await self.manager.create_progress_ledger(context) # Verify the exception message self.assertEqual(str(cm.exception), "WebSocket error")