Skip to content

Commit 8a8aa25

Browse files
Testcases
1 parent ca3490b commit 8a8aa25

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

src/backend/agents/tech_support.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ async def get_tech_information(
523523
Document Name: Contoso's IT Policy and Procedure Manual
524524
Domain: IT Policy
525525
Description: A comprehensive guide detailing the IT policies and procedures at Contoso, including acceptable use, security protocols, and incident reporting.
526-
527526
At Contoso, we prioritize the security and efficiency of our IT infrastructure. All employees are required to adhere to the following policies:
528527
- Use strong passwords and change them every 90 days.
529528
- Report any suspicious emails to the IT department immediately.

src/backend/tests/agents/test_tech_support.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import os
22
import sys
33
import pytest
4-
from unittest.mock import AsyncMock, MagicMock
4+
from unittest.mock import MagicMock
55
from autogen_core.components.tools import FunctionTool
66

7+
# Mock the azure.monitor.events.extension module globally
78
sys.modules["azure.monitor.events.extension"] = MagicMock()
89

9-
# Set environment variables to mock Config dependencies before any import
10+
# Set environment variables to mock Config dependencies
1011
os.environ["COSMOSDB_ENDPOINT"] = "https://mock-endpoint"
1112
os.environ["COSMOSDB_KEY"] = "mock-key"
1213
os.environ["COSMOSDB_DATABASE"] = "mock-database"
@@ -63,7 +64,6 @@
6364
get_tech_support_tools,
6465
)
6566

66-
6767
@pytest.mark.asyncio
6868
async def test_collaborate_with_code_deployment():
6969
result = await collaborate_with_code_deployment("AI Deployment Project")

src/backend/tests/test_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
sys.modules["azure.monitor.opentelemetry"] = MagicMock()
1111

1212
# Mock the configure_azure_monitor function
13-
#from azure.monitor.opentelemetry import configure_azure_monitor
14-
1513
configure_azure_monitor = MagicMock()
14+
1615
# Set up environment variables
1716
os.environ["COSMOSDB_ENDPOINT"] = "https://mock-endpoint"
1817
os.environ["COSMOSDB_KEY"] = "mock-key"
@@ -68,7 +67,8 @@ def test_input_task_missing_description():
6867

6968

7069
def test_input_task_success():
71-
"""Test the successful creation of an InputTask."""
70+
"""Test the successful creation of an InputTask."""
71+
7272

7373
def test_basic_endpoint():
7474
"""Test a basic endpoint to ensure the app runs."""

src/backend/tests/test_otlp_tracing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import sys
22
import os
3-
import pytest
43
from unittest.mock import patch, MagicMock
54

65
# Add the backend directory to the Python path

0 commit comments

Comments
 (0)