mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Update getting started samples to reflect AF. Update a unit test. (#1093)
This commit is contained in:
committed by
GitHub
Unverified
parent
6d0f28eb9b
commit
4f4890cf6a
@@ -48,6 +48,7 @@ from azure.core.credentials_async import AsyncTokenCredential
|
||||
from azure.core.exceptions import HttpResponseError
|
||||
from azure.identity.aio import AzureCliCredential
|
||||
from pydantic import BaseModel, Field, ValidationError
|
||||
from pytest import MonkeyPatch
|
||||
|
||||
from agent_framework_azure_ai import AzureAIAgentClient, AzureAISettings
|
||||
|
||||
@@ -1006,8 +1007,11 @@ async def test_azure_ai_chat_client_prep_tools_file_search_no_connection(mock_ai
|
||||
await chat_client._prep_tools([file_search_tool]) # type: ignore
|
||||
|
||||
|
||||
async def test_azure_ai_chat_client_prep_tools_file_search_no_index_name(mock_ai_project_client: MagicMock) -> None:
|
||||
async def test_azure_ai_chat_client_prep_tools_file_search_no_index_name(
|
||||
mock_ai_project_client: MagicMock, monkeypatch: MonkeyPatch
|
||||
) -> None:
|
||||
"""Test _prep_tools with HostedFileSearchTool missing index_name and vector stores."""
|
||||
monkeypatch.delenv("AZURE_AI_SEARCH_INDEX_NAME", raising=False)
|
||||
|
||||
chat_client = create_test_azure_ai_chat_client(mock_ai_project_client, agent_id="test-agent")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user