Skip to content

Commit ac2cc9d

Browse files
committed
Update patch target in test_utils.py
Changed the patch target for ANSIBLE_AI_MODEL_MESH_CONFIG in TestHasWCAProvidersWithWCAProvider to reflect the new import path. This ensures the test correctly mocks the configuration in its current location.
1 parent 7269085 commit ac2cc9d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ansible_ai_connect/main/tests/test_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ class TestHasWCAProvidersWithWCAProvider(WisdomServiceLogAwareTestCase):
3535
def test_returns_true_with_wca_provider(self):
3636
"""Test that has_wca_providers returns True when WCA provider is configured."""
3737
# Create a factory with WCA config directly, without affecting global state
38-
with patch(
39-
"ansible_ai_connect.main.settings.base.ANSIBLE_AI_MODEL_MESH_CONFIG", mock_config("wca")
40-
):
38+
config_path = (
39+
"ansible_ai_connect.ai.api.model_pipelines.config_loader.settings."
40+
"ANSIBLE_AI_MODEL_MESH_CONFIG"
41+
)
42+
with patch(config_path, mock_config("wca")):
4143
factory = ModelPipelineFactory()
4244
with patch("ansible_ai_connect.main.utils.apps.get_app_config") as mock_app:
4345
mock_app.return_value._pipeline_factory = factory

0 commit comments

Comments
 (0)