Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tests/backend/common/config/test_app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tests/backend/common/utils/test_otlp_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
5 changes: 2 additions & 3 deletions src/tests/backend/v4/common/services/test_team_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions src/tests/backend/v4/magentic_agents/test_proxy_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down