Skip to content

Commit 2a5d61c

Browse files
refactor: remove unused imports from test files for improved code quality
1 parent 2b601b3 commit 2a5d61c

10 files changed

Lines changed: 6 additions & 12 deletions

File tree

src/tests/backend/common/config/test_app_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import os
1414
import logging
1515
from unittest.mock import patch, MagicMock, AsyncMock
16-
from azure.identity import ManagedIdentityCredential
1716

1817
# Add the source root directory to the Python path for imports
1918
import sys

src/tests/backend/common/database/test_cosmosdb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import logging
55
import sys
66
import os
7-
from typing import Dict, List, Optional
87
from unittest.mock import AsyncMock, Mock, patch
98
import pytest
109

src/tests/backend/common/database/test_database_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
from abc import ABC
66
from typing import Any, Dict, List, Optional, Type
7-
from unittest.mock import Mock, patch
7+
from unittest.mock import Mock
88
import pytest
99

1010
# Add the backend directory to the Python path

src/tests/backend/v4/common/services/test_base_api_service.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import sys
1414
import importlib.util
1515
from unittest.mock import patch, MagicMock, AsyncMock, Mock
16-
from typing import Dict, Optional, Union
1716
import aiohttp
1817
from aiohttp import ClientTimeout, ClientSession
1918

src/tests/backend/v4/common/services/test_mcp_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
import sys
1515
import asyncio
1616
import importlib.util
17-
from unittest.mock import patch, MagicMock, Mock
18-
from typing import Dict, Optional
17+
from unittest.mock import patch, MagicMock
1918
from aiohttp import ClientTimeout, ClientError
2019

2120
# Add the src directory to sys.path for proper import

src/tests/backend/v4/common/services/test_team_service.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import uuid
2020
import importlib.util
2121
from unittest.mock import patch, MagicMock, AsyncMock
22-
from typing import Dict, Optional, List, Tuple
2322
from datetime import datetime, timezone
2423

2524
# Add the src directory to sys.path for proper import

src/tests/backend/v4/config/test_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ async def cancel_task():
432432
cancel_task_handle = asyncio.create_task(cancel_task())
433433

434434
with self.assertRaises(asyncio.CancelledError):
435-
result = await task
435+
await task
436436

437437
await cancel_task_handle
438438

@@ -454,7 +454,7 @@ async def cancel_task():
454454
with self.assertRaises(asyncio.CancelledError):
455455
await task
456456

457-
_ = await cancel_task_handle
457+
await cancel_task_handle
458458

459459
def test_cleanup_approval(self):
460460
"""Test cleanup approval."""

src/tests/backend/v4/magentic_agents/test_foundry_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import sys
44
import os
5-
from unittest.mock import Mock, patch, AsyncMock, call
5+
from unittest.mock import Mock, patch, AsyncMock
66
import pytest
77

88
# Add the backend directory to the Python path

src/tests/backend/v4/magentic_agents/test_magentic_agent_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
import sys
44
from types import SimpleNamespace
5-
from unittest.mock import Mock, patch, AsyncMock
5+
from unittest.mock import Mock, AsyncMock
66
import pytest
77

88
# Mock the dependencies before importing the module under test

src/tests/backend/v4/orchestration/test_human_approval_manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import os
88
import sys
99
import unittest
10-
from typing import Optional
1110
from unittest.mock import Mock, AsyncMock, patch
1211

1312
# Add the backend directory to the Python path

0 commit comments

Comments
 (0)