Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sdk/identity/azure-identity/tests/test_aad_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Licensed under the MIT License.
# ------------------------------------
import functools
import json

from azure.core.exceptions import ClientAuthenticationError
from azure.identity._constants import EnvironmentVariables
Expand Down Expand Up @@ -53,7 +54,7 @@ def test_error_reporting():
error_description = "something went wrong"
error_response = {"error": error_name, "error_description": error_description}

response = Mock(status_code=403, json=lambda: error_response)
response = Mock(status_code=403, json=lambda: error_response, text=json.dumps(error_response))
transport = Mock(return_value=response)
session = Mock(get=transport, post=transport)
client = MockClient("tenant id", "client id", session=session)
Expand Down