Skip to content

Commit 1b14417

Browse files
fix: update test patches to use new agent_framework.openai classes
Updated mock patches in test_agent_framework_helper.py to reference: - agent_framework.openai.OpenAIChatCompletionClient (was azure.AzureOpenAIChatClient) - agent_framework.openai.OpenAIChatClient (was azure.AzureOpenAIResponsesClient) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ee4650a commit 1b14417

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ContentProcessorWorkflow/tests/unit/libs/agent_framework/test_agent_framework_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_unsupported_type_raises_value_error(self):
9595
def test_azure_chat_completion_creates_client(self, mock_token):
9696
mock_token.return_value = lambda: "token"
9797

98-
with patch("agent_framework.azure.AzureOpenAIChatClient") as mock_cls:
98+
with patch("agent_framework.openai.OpenAIChatCompletionClient") as mock_cls:
9999
mock_cls.return_value = "chat_client"
100100
client = AgentFrameworkHelper.create_client(
101101
client_type=ClientType.AzureOpenAIChatCompletion,
@@ -108,7 +108,7 @@ def test_azure_chat_completion_creates_client(self, mock_token):
108108
def test_azure_response_creates_client(self, mock_token):
109109
mock_token.return_value = lambda: "token"
110110

111-
with patch("agent_framework.azure.AzureOpenAIResponsesClient") as mock_cls:
111+
with patch("agent_framework.openai.OpenAIChatClient") as mock_cls:
112112
mock_cls.return_value = "response_client"
113113
client = AgentFrameworkHelper.create_client(
114114
client_type=ClientType.AzureOpenAIResponse,

src/tests/ContentProcessorWorkflow/libs/agent_framework/test_agent_framework_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_azure_chat_completion_creates_client(self, mock_token):
100100
mock_token.return_value = lambda: "token"
101101

102102
with patch(
103-
"agent_framework.azure.AzureOpenAIChatClient"
103+
"agent_framework.openai.OpenAIChatCompletionClient"
104104
) as mock_cls:
105105
mock_cls.return_value = "chat_client"
106106
client = AgentFrameworkHelper.create_client(
@@ -115,7 +115,7 @@ def test_azure_response_creates_client(self, mock_token):
115115
mock_token.return_value = lambda: "token"
116116

117117
with patch(
118-
"agent_framework.azure.AzureOpenAIResponsesClient"
118+
"agent_framework.openai.OpenAIChatClient"
119119
) as mock_cls:
120120
mock_cls.return_value = "response_client"
121121
client = AgentFrameworkHelper.create_client(

0 commit comments

Comments
 (0)