Skip to content

Commit 3d8f384

Browse files
fixed for wrong import in test files
1 parent ed7c874 commit 3d8f384

File tree

12 files changed

+19
-20
lines changed

12 files changed

+19
-20
lines changed

src/backend/tests/auth/test_auth_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import base64
33
import json
44

5-
from auth.auth_utils import get_authenticated_user_details, get_tenantid
5+
from src.backend.auth.auth_utils import get_authenticated_user_details, get_tenantid
66

77

88
def test_get_authenticated_user_details_with_headers():

src/backend/tests/auth/test_sample_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from auth.sample_user import sample_user # Adjust path as necessary
1+
from src.backend.auth.sample_user import sample_user # Adjust path as necessary
22

33

44
def test_sample_user_keys():

src/backend/tests/middleware/test_health_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from middleware.health_check import (
1+
from src.backend.middleware.health_check import (
22
HealthCheckMiddleware,
33
HealthCheckResult,
44
)

src/backend/tests/models/test_messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# File: test_message.py
22

33
import uuid
4-
from models.messages import (
4+
from src.backend.common.models.messages_kernel import (
55
DataType,
66
AgentType as BAgentType, # map to your enum
77
StepStatus,

src/backend/tests/test_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
# Import the current config objects/functions under the mocked env
3939
with patch.dict(os.environ, MOCK_ENV_VARS, clear=False):
4040
# New codebase: config lives in app_config/config_kernel
41-
from src.backend.app_config import config as app_config
42-
from src.backend.config_kernel import Config
41+
from src.backend.common.config.app_config import config as app_config
4342

4443
# Provide thin wrappers so the old test names still work
4544
def GetRequiredConfig(name: str, default=None):

src/backend/tests/test_otlp_tracing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import sys
22
import os
33
from unittest.mock import patch, MagicMock
4-
from common.utils.otlp_tracing import (
4+
from src.backend.common.utils.otlp_tracing import (
55
configure_oltp_tracing,
66
) # Import directly since it's in backend
77

88
# Add the backend directory to the Python path
99
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
1010

1111

12-
@patch("otlp_tracing.TracerProvider")
13-
@patch("otlp_tracing.OTLPSpanExporter")
14-
@patch("otlp_tracing.Resource")
12+
@patch("src.backend.common.utils.otlp_tracing.TracerProvider")
13+
@patch("src.backend.common.utils.otlp_tracing.OTLPSpanExporter")
14+
@patch("src.backend.common.utils.otlp_tracing.Resource")
1515
def test_configure_oltp_tracing(
1616
mock_resource,
1717
mock_otlp_exporter,

src/backend/v3/magentic_agents/foundry_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from azure.ai.agents.models import (AzureAISearchTool, BingGroundingTool,
88
CodeInterpreterToolDefinition)
99
from semantic_kernel.agents import Agent, AzureAIAgent # pylint: disable=E0611
10-
from v3.magentic_agents.common.lifecycle import AzureAgentBase
11-
from v3.magentic_agents.models.agent_models import MCPConfig, SearchConfig
10+
from src.backend.v3.magentic_agents.common.lifecycle import AzureAgentBase
11+
from src.backend.v3.magentic_agents.models.agent_models import MCPConfig, SearchConfig
1212

1313
# from v3.magentic_agents.models.agent_models import (BingConfig, MCPConfig,
1414
# SearchConfig)

src/backend/v3/magentic_agents/models/agent_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from dataclasses import dataclass
55

6-
from common.config.app_config import config
6+
from src.backend.common.config.app_config import config
77

88

99
@dataclass(slots=True)

src/tests/agents/test_foundry_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
sys.path.insert(0, str(backend_path))
1515

1616
# Now import from the v3 package
17-
from v3.magentic_agents.foundry_agent import FoundryAgentTemplate
18-
from v3.magentic_agents.models.agent_models import (BingConfig, MCPConfig,
17+
from src.backend.v3.magentic_agents.foundry_agent import FoundryAgentTemplate
18+
from src.backend.v3.magentic_agents.models.agent_models import (BingConfig, MCPConfig,
1919
SearchConfig)
2020

2121

src/tests/mcp_server/test_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
import pytest
6-
from core.factory import MCPToolFactory, Domain, MCPToolBase
6+
from src.mcp_server.core.factory import MCPToolFactory, Domain, MCPToolBase
77

88

99
class TestMCPToolFactory:

0 commit comments

Comments
 (0)