File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
sdk/identity/azure-identity/tests Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,12 @@ def get_discovery_response(endpoint="https://a/b"):
162
162
sufficient. MSAL will send token requests to "{endpoint}/oauth2/v2.0/token_endpoint" after receiving a tenant
163
163
discovery response created by this method.
164
164
"""
165
- aad_metadata_endpoint_names = ("authorization_endpoint" , "token_endpoint" , "tenant_discovery_endpoint" )
165
+ aad_metadata_endpoint_names = (
166
+ "authorization_endpoint" ,
167
+ "token_endpoint" ,
168
+ "tenant_discovery_endpoint" ,
169
+ "device_authorization_endpoint" ,
170
+ )
166
171
payload = {name : endpoint + "/oauth2/v2.0/" + name for name in aad_metadata_endpoint_names }
167
172
payload ["metadata" ] = ""
168
173
return mock_response (json_payload = payload )
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ def test_device_code_credential():
178
178
requests = [Request ()] * 3 , # not validating requests because they're formed by MSAL
179
179
responses = [
180
180
# expected requests: discover tenant, start device code flow, poll for completion
181
- mock_response ( json_payload = { "authorization_endpoint" : "https://a/b" , "token_endpoint" : "https://a/b" } ),
181
+ get_discovery_response ( ),
182
182
mock_response (
183
183
json_payload = {
184
184
"device_code" : "_" ,
@@ -237,7 +237,7 @@ def test_tenant_id():
237
237
requests = [Request ()] * 3 , # not validating requests because they're formed by MSAL
238
238
responses = [
239
239
# expected requests: discover tenant, start device code flow, poll for completion
240
- mock_response ( json_payload = { "authorization_endpoint" : "https://a/b" , "token_endpoint" : "https://a/b" } ),
240
+ get_discovery_response ( ),
241
241
mock_response (
242
242
json_payload = {
243
243
"device_code" : "_" ,
You can’t perform that action at this time.
0 commit comments