@@ -112,7 +112,7 @@ def test_default_token_provider_when_no_credential(self):
112112 def test_azure_openai_chat_completion (self ):
113113 fake_module = types .ModuleType ("agent_framework.azure" )
114114 with patch .dict (sys .modules , {"agent_framework.azure" : fake_module }):
115- with pytest .raises (NotImplementedError , match = "AzureOpenAIChatClient was removed" ):
115+ with pytest .raises (ImportError ):
116116 AgentFrameworkHelper .create_client (
117117 ClientType .AzureOpenAIChatCompletion ,
118118 endpoint = "https://x" ,
@@ -123,7 +123,7 @@ def test_azure_openai_chat_completion(self):
123123 def test_azure_openai_assistant (self ):
124124 fake_module = types .ModuleType ("agent_framework.azure" )
125125 with patch .dict (sys .modules , {"agent_framework.azure" : fake_module }):
126- with pytest .raises (NotImplementedError , match = "AzureOpenAIAssistantsClient was removed" ):
126+ with pytest .raises (ImportError ):
127127 AgentFrameworkHelper .create_client (
128128 ClientType .AzureOpenAIAssistant ,
129129 endpoint = "https://x" ,
@@ -134,7 +134,7 @@ def test_azure_openai_assistant(self):
134134 def test_azure_openai_response (self ):
135135 fake_module = types .ModuleType ("agent_framework.azure" )
136136 with patch .dict (sys .modules , {"agent_framework.azure" : fake_module }):
137- with pytest .raises (NotImplementedError , match = "AzureOpenAIResponsesClient was removed" ):
137+ with pytest .raises (ImportError ):
138138 AgentFrameworkHelper .create_client (
139139 ClientType .AzureOpenAIResponse ,
140140 endpoint = "https://x" ,
0 commit comments