Example #1
0
 def test_get_saml_idp_class_with_fake_identifier(self, log_mock):
     error_mock = log_mock.error
     idp_class = get_saml_idp_class('fake_idp_class_option')
     error_mock.assert_called_once_with(
         u'%s is not a valid EdXSAMLIdentityProvider subclass; using EdXSAMLIdentityProvider base class.',
         'fake_idp_class_option')
     self.assertIs(idp_class, EdXSAMLIdentityProvider)
 def test_get_saml_idp_class_with_fake_identifier(self, log_mock):
     error_mock = log_mock.error
     idp_class = get_saml_idp_class('fake_idp_class_option')
     error_mock.assert_called_once_with(
         u'[THIRD_PARTY_AUTH] Invalid EdXSAMLIdentityProvider subclass--'
         u'using EdXSAMLIdentityProvider base class. Provider: {provider}'.
         format(provider='fake_idp_class_option'))
     self.assertIs(idp_class, EdXSAMLIdentityProvider)
Example #3
0
 def test_get_saml_idp_class_with_fake_identifier(self, log_mock):
     error_mock = log_mock.error
     idp_class = get_saml_idp_class('fake_idp_class_option')
     error_mock.assert_called_once_with(
         '%s is not a valid EdXSAMLIdentityProvider subclass; using EdXSAMLIdentityProvider base class.',
         'fake_idp_class_option'
     )
     self.assertIs(idp_class, EdXSAMLIdentityProvider)