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"):
162162 sufficient. MSAL will send token requests to "{endpoint}/oauth2/v2.0/token_endpoint" after receiving a tenant
163163 discovery response created by this method.
164164 """
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+ )
166171 payload = {name : endpoint + "/oauth2/v2.0/" + name for name in aad_metadata_endpoint_names }
167172 payload ["metadata" ] = ""
168173 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():
178178 requests = [Request ()] * 3 , # not validating requests because they're formed by MSAL
179179 responses = [
180180 # 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 ( ),
182182 mock_response (
183183 json_payload = {
184184 "device_code" : "_" ,
@@ -237,7 +237,7 @@ def test_tenant_id():
237237 requests = [Request ()] * 3 , # not validating requests because they're formed by MSAL
238238 responses = [
239239 # 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 ( ),
241241 mock_response (
242242 json_payload = {
243243 "device_code" : "_" ,
You can’t perform that action at this time.
0 commit comments