File tree Expand file tree Collapse file tree 3 files changed +6
-19
lines changed
Expand file tree Collapse file tree 3 files changed +6
-19
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33import pytest
4- from unittest .mock import MagicMock , patch
4+ from unittest .mock import MagicMock
55from fastapi .testclient import TestClient
66
77# Mock Azure dependencies
1010sys .modules ["azure.monitor.opentelemetry" ] = MagicMock ()
1111
1212# Mock the configure_azure_monitor function
13- from azure .monitor .opentelemetry import configure_azure_monitor
13+ # from azure.monitor.opentelemetry import configure_azure_monitor
1414
1515configure_azure_monitor = MagicMock ()
1616# Set up environment variables
@@ -68,13 +68,7 @@ def test_input_task_missing_description():
6868
6969
7070def test_input_task_success ():
71- """Test the successful creation of an InputTask."""
72- input_task = {
73- "session_id" : "test_session_id" ,
74- "description" : "Test Task" ,
75- "user_id" : "mock-user-id" ,
76- }
77-
71+ """Test the successful creation of an InputTask."""
7872
7973def test_basic_endpoint ():
8074 """Test a basic endpoint to ensure the app runs."""
Original file line number Diff line number Diff line change 11import os
22import pytest
3- from unittest .mock import MagicMock , patch , AsyncMock
3+ from unittest .mock import patch , AsyncMock
44from src .backend .utils import initialize_runtime_and_context , runtime_dict , rai_success
55from uuid import uuid4
66
Original file line number Diff line number Diff line change 2323# from agents.misc import MiscAgent
2424from src .backend .config import Config
2525from src .backend .context .cosmos_memory import CosmosBufferedChatCompletionContext
26- from src .backend .models .messages import BAgentType , Step
27- from collections import defaultdict
28- import logging
26+ from src .backend .models .messages import BAgentType
27+ # from collections import defaultdict
2928
3029# Initialize logging
3130# from otlp_tracing import configure_oltp_tracing
3231
33- from src .backend .models .messages import (
34- InputTask ,
35- Plan ,
36- )
3732
3833logging .basicConfig (level = logging .INFO )
3934# tracer = configure_oltp_tracing()
@@ -74,8 +69,6 @@ async def initialize_runtime_and_context(
7469 Returns:
7570 Tuple[SingleThreadedAgentRuntime, CosmosBufferedChatCompletionContext]: The runtime and context for the session.
7671 """
77- global runtime_dict
78- global aoai_model_client
7972
8073 if user_id is None :
8174 raise ValueError (
You can’t perform that action at this time.
0 commit comments