Fixed some major mistyping and added the default setting.
This commit is contained in:
parent
81ebc74ecd
commit
951dc60e99
@ -185,6 +185,8 @@ CAS_NEW_VERSION_EMAIL_WARNING = True
|
|||||||
#: You should not change it.
|
#: You should not change it.
|
||||||
CAS_NEW_VERSION_JSON_URL = "https://pypi.python.org/pypi/django-cas-server/json"
|
CAS_NEW_VERSION_JSON_URL = "https://pypi.python.org/pypi/django-cas-server/json"
|
||||||
|
|
||||||
|
#: If the service message should be displayed on the login page
|
||||||
|
CAS_SHOW_SERVICE_MESSAGES = True
|
||||||
|
|
||||||
#: Messages displayed in a info-box on the html pages of the default templates.
|
#: Messages displayed in a info-box on the html pages of the default templates.
|
||||||
#: ``CAS_INFO_MESSAGES`` is a :class:`dict` mapping message name to a message :class:`dict`.
|
#: ``CAS_INFO_MESSAGES`` is a :class:`dict` mapping message name to a message :class:`dict`.
|
||||||
|
@ -295,7 +295,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
) in response.content
|
) in response.content
|
||||||
)
|
)
|
||||||
|
|
||||||
@override_settings(CAS_SHOW_SERVER_MESSAGES=False)
|
@override_settings(CAS_SHOW_SERVICE_MESSAGES=False)
|
||||||
def test_view_login_get_allowed_service_no_message(self):
|
def test_view_login_get_allowed_service_no_message(self):
|
||||||
"""Request a ticket for an allowed service by an unauthenticated client"""
|
"""Request a ticket for an allowed service by an unauthenticated client"""
|
||||||
# get a bare new http client
|
# get a bare new http client
|
||||||
@ -324,7 +324,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
# we warn the user that https://www.example.net is not an allowed service url
|
# we warn the user that https://www.example.net is not an allowed service url
|
||||||
self.assertTrue(b"Service https://www.example.net not allowed" in response.content)
|
self.assertTrue(b"Service https://www.example.net not allowed" in response.content)
|
||||||
|
|
||||||
@override_settings(CAS_SHOW_SERVER_MESSAGES=False)
|
@override_settings(CAS_SHOW_SERVICE_MESSAGES=False)
|
||||||
def test_view_login_get_denied_service_no_message(self):
|
def test_view_login_get_denied_service_no_message(self):
|
||||||
"""Request a ticket for an denied service by an unauthenticated client"""
|
"""Request a ticket for an denied service by an unauthenticated client"""
|
||||||
# get a bare new http client
|
# get a bare new http client
|
||||||
@ -535,7 +535,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
# renewing authentication is done in the validate and serviceValidate views tests
|
# renewing authentication is done in the validate and serviceValidate views tests
|
||||||
self.assertEqual(ticket.renew, True)
|
self.assertEqual(ticket.renew, True)
|
||||||
|
|
||||||
@override_settings(CAS_SHOW_SERVER_MESSAGES=False)
|
@override_settings(CAS_SHOW_SERVICE_MESSAGES=False)
|
||||||
def test_renew_message_disabled(self):
|
def test_renew_message_disabled(self):
|
||||||
"""test the authentication renewal request from a service"""
|
"""test the authentication renewal request from a service"""
|
||||||
# use the default test service
|
# use the default test service
|
||||||
|
Loading…
Reference in New Issue
Block a user