Skip to content

Commit e430371

Browse files
committed
fix UT
1 parent e5dd71f commit e430371

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/aks-agent/azext_aks_agent/custom.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
# pylint: disable=too-many-lines, disable=broad-except
1111
from azext_aks_agent.agent.agent import aks_agent as aks_agent_internal
1212
from azext_aks_agent.agent.llm_config_manager import LLMConfigManager
13-
from azext_aks_agent.agent.llm_providers import (
14-
PROVIDER_REGISTRY,
15-
prompt_provider_choice,
16-
)
13+
from azext_aks_agent.agent.llm_providers import prompt_provider_choice
1714
from azext_aks_agent.agent.logging import rich_logging
1815
from azure.cli.core.api import get_config_dir
1916
from azure.cli.core.azclierror import AzCLIError

src/aks-agent/azext_aks_agent/tests/latest/test_aks_agent_llm_config_manager.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,6 @@ def test_export_model_config_sets_environment_variables(self, mock_environ, mock
647647

648648
# Verify environment variables were set
649649
self.assertEqual(mock_environ["OPENAI_API_KEY"], "test-key")
650-
self.assertEqual("MODEL_NAME", mock_environ)
651650
self.assertNotIn("provider", mock_environ)
652651

653652
# Verify provider was called correctly
@@ -685,7 +684,7 @@ def test_export_model_config_azure_converts_model_name(self, mock_environ, mock_
685684
self.assertEqual(llm_config["DEPLOYMENT_NAME"], "gpt-4-legacy")
686685

687686
# Verify environment variables
688-
self.assertEqual("DEPLOYMENT_NAME", mock_environ)
687+
self.assertEqual(mock_environ["AZURE_OPENAI_API_KEY"], "azure-key")
689688
self.assertEqual(mock_environ["AZURE_OPENAI_ENDPOINT"], "https://test.openai.azure.com")
690689

691690
# Verify provider was called with deployment name
@@ -716,7 +715,7 @@ def test_export_model_config_azure_with_deployment_name(self, mock_environ, mock
716715

717716
# Verify DEPLOYMENT_NAME is preserved
718717
self.assertEqual(llm_config["DEPLOYMENT_NAME"], "my-gpt-4-deployment")
719-
self.assertEqual("DEPLOYMENT_NAME", mock_environ)
718+
self.assertEqual(mock_environ["AZURE_OPENAI_ENDPOINT"], "https://test.openai.azure.com")
720719

721720
# Verify provider was called with deployment name
722721
mock_provider_instance.model_name.assert_called_once_with("my-gpt-4-deployment")

0 commit comments

Comments
 (0)