Add a unit test with a non ascii char in service url as reported in #82
This commit is contained in:
parent
00ea051dcd
commit
3ee7e0ae98
1 changed files with 10 additions and 0 deletions
|
@ -337,6 +337,16 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
||||||
self.assertFalse(b"Service https://www.example.net not allowed" in response.content)
|
self.assertFalse(b"Service https://www.example.net not allowed" in response.content)
|
||||||
|
|
||||||
def test_view_login_get_auth_allowed_service(self):
|
def test_view_login_get_auth_allowed_service(self):
|
||||||
|
"""Request a ticket for an allowed service by an authenticated client containing non ascii char in url"""
|
||||||
|
# get a client that is already authenticated
|
||||||
|
client = get_auth_client()
|
||||||
|
# ask for a ticket for https://www.example.com
|
||||||
|
response = client.get("/login?service=https://www.example.com/é")
|
||||||
|
# as https://www.example.com/é is a valid service a ticket should be created and the
|
||||||
|
# user redirected to the service url
|
||||||
|
self.assert_service_ticket(client, response)
|
||||||
|
|
||||||
|
def test_view_login_get_auth_allowed_service_non_ascii(self):
|
||||||
"""Request a ticket for an allowed service by an authenticated client"""
|
"""Request a ticket for an allowed service by an authenticated client"""
|
||||||
# get a client that is already authenticated
|
# get a client that is already authenticated
|
||||||
client = get_auth_client()
|
client = get_auth_client()
|
||||||
|
|
Loading…
Add table
Reference in a new issue