2424_OIDC_DISCOVERY_MOCK = Mock (return_value = {
2525 "authorization_endpoint" : "https://contoso.com/placeholder" ,
2626 "token_endpoint" : "https://contoso.com/placeholder" ,
27+ "issuer" : "https://contoso.com/tenant" ,
2728})
2829
2930
@@ -690,6 +691,7 @@ def mock_post(url, headers=None, *args, **kwargs):
690691 @patch (_OIDC_DISCOVERY , new = Mock (return_value = {
691692 "authorization_endpoint" : "https://contoso.com/common" ,
692693 "token_endpoint" : "https://contoso.com/common" ,
694+ "issuer" : "https://contoso.com/common" ,
693695 }))
694696 def test_common_authority_should_emit_warning (self ):
695697 self ._test_certain_authority_should_emit_warning (
@@ -698,6 +700,7 @@ def test_common_authority_should_emit_warning(self):
698700 @patch (_OIDC_DISCOVERY , new = Mock (return_value = {
699701 "authorization_endpoint" : "https://contoso.com/organizations" ,
700702 "token_endpoint" : "https://contoso.com/organizations" ,
703+ "issuer" : "https://contoso.com/organizations" ,
701704 }))
702705 def test_organizations_authority_should_emit_warning (self ):
703706 self ._test_certain_authority_should_emit_warning (
@@ -755,6 +758,7 @@ def test_client_id_should_be_a_valid_scope(self):
755758@patch ("msal.authority.tenant_discovery" , new = Mock (return_value = {
756759 "authorization_endpoint" : "https://contoso.com/placeholder" ,
757760 "token_endpoint" : "https://contoso.com/placeholder" ,
761+ "issuer" : "https://contoso.com/placeholder" ,
758762 }))
759763class TestMsalBehaviorWithoutPyMsalRuntimeOrBroker (unittest .TestCase ):
760764
0 commit comments