diff --git a/sdk/openai/azure-openai/tests/test_chat_completions.py b/sdk/openai/azure-openai/tests/test_chat_completions.py index ce8e526a0d46..b70421e187ea 100644 --- a/sdk/openai/azure-openai/tests/test_chat_completions.py +++ b/sdk/openai/azure-openai/tests/test_chat_completions.py @@ -847,8 +847,8 @@ def test_chat_completion_block_list_term(self, client, api_type, api_version, ** err = e.value.body assert err["code"] == "content_filter" content_filter_result = err["innererror"]["content_filter_result"] - assert content_filter_result["custom_blocklists"][0]["filtered"] is True - assert content_filter_result["custom_blocklists"][0]["id"].startswith("CustomBlockList") + assert content_filter_result["custom_blocklists"]["filtered"] is True + assert content_filter_result["custom_blocklists"]["details"][0]["id"].startswith("CustomBlockList") assert content_filter_result["hate"]["filtered"] is False assert content_filter_result["hate"]["severity"] == "safe" assert content_filter_result["self_harm"]["filtered"] is False diff --git a/sdk/openai/azure-openai/tests/test_chat_completions_async.py b/sdk/openai/azure-openai/tests/test_chat_completions_async.py index 1ebd605514b2..f8fb91b3790e 100644 --- a/sdk/openai/azure-openai/tests/test_chat_completions_async.py +++ b/sdk/openai/azure-openai/tests/test_chat_completions_async.py @@ -868,8 +868,8 @@ async def test_chat_completion_block_list_term(self, client_async, api_type, api err = e.value.body assert err["code"] == "content_filter" content_filter_result = err["innererror"]["content_filter_result"] - assert content_filter_result["custom_blocklists"][0]["filtered"] is True - assert content_filter_result["custom_blocklists"][0]["id"].startswith("CustomBlockList") + assert content_filter_result["custom_blocklists"]["filtered"] is True + assert content_filter_result["custom_blocklists"]["details"][0]["id"].startswith("CustomBlockList") assert content_filter_result["hate"]["filtered"] is False assert content_filter_result["hate"]["severity"] == "safe" assert content_filter_result["self_harm"]["filtered"] is False