set a default value for IDENTITY_PROVIDERS ((fixes #20221)
This commit is contained in:
parent
b66a974922
commit
be791d54a8
|
@ -28,9 +28,6 @@ class DefaultAdapter(object):
|
|||
return idp
|
||||
|
||||
def get_identity_providers_setting(self):
|
||||
if not app_settings.IDENTITY_PROVIDERS:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured('The MELLON_IDENTITY_PROVIDERS setting is mandatory')
|
||||
return app_settings.IDENTITY_PROVIDERS
|
||||
|
||||
def get_idps(self):
|
||||
|
|
|
@ -4,6 +4,7 @@ import sys
|
|||
class AppSettings(object):
|
||||
__PREFIX = 'MELLON_'
|
||||
__DEFAULTS = {
|
||||
'IDENTITY_PROVIDERS': [],
|
||||
'DISCOVERY_SERVICE_URL': None,
|
||||
'PUBLIC_KEYS': (),
|
||||
'PRIVATE_KEY': None,
|
||||
|
|
|
@ -8,7 +8,6 @@ import hashlib
|
|||
from httmock import HTTMock
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.utils.http import urlencode
|
||||
|
||||
from xml_utils import assert_xml_constraints
|
||||
|
@ -122,11 +121,6 @@ def test_metadata(private_settings, client):
|
|||
namespaces=ns)
|
||||
|
||||
|
||||
def test_sp_initiated_login_improperly_configured(private_settings, client):
|
||||
with pytest.raises(ImproperlyConfigured):
|
||||
client.get('/login/')
|
||||
|
||||
|
||||
def test_sp_initiated_login_improperly_configured2(private_settings, client):
|
||||
private_settings.MELLON_IDENTITY_PROVIDERS = []
|
||||
response = client.get('/login/')
|
||||
|
|
Loading…
Reference in New Issue