Fix english typos in tests
This commit is contained in:
parent
e8d893beeb
commit
cd57f101bc
@ -234,7 +234,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
response = client.get("/login?service=https://www.example.net")
|
response = client.get("/login?service=https://www.example.net")
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# 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 non allowed" in response.content)
|
self.assertTrue(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"""
|
"""Request a ticket for an allowed service by an authenticated client"""
|
||||||
@ -280,7 +280,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# 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
|
||||||
# NO ticket are created
|
# NO ticket are created
|
||||||
self.assertTrue(b"Service https://www.example.org non allowed" in response.content)
|
self.assertTrue(b"Service https://www.example.org not allowed" in response.content)
|
||||||
|
|
||||||
def test_user_logged_not_in_db(self):
|
def test_user_logged_not_in_db(self):
|
||||||
"""If the user is logged but has been delete from the database, it should be logged out"""
|
"""If the user is logged but has been delete from the database, it should be logged out"""
|
||||||
@ -314,7 +314,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
response = client.get("/login", {'service': self.service_restrict_user_fail})
|
response = client.get("/login", {'service': self.service_restrict_user_fail})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# the ticket is not created and a warning is displayed to the user
|
# the ticket is not created and a warning is displayed to the user
|
||||||
self.assertTrue(b"Username non allowed" in response.content)
|
self.assertTrue(b"Username not allowed" in response.content)
|
||||||
|
|
||||||
# same but with the tes user username being one of the allowed usernames
|
# same but with the tes user username being one of the allowed usernames
|
||||||
response = client.get("/login", {'service': self.service_restrict_user_success})
|
response = client.get("/login", {'service': self.service_restrict_user_success})
|
||||||
@ -337,7 +337,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
response = client.get("/login", {'service': service})
|
response = client.get("/login", {'service': service})
|
||||||
# the ticket is not created and a warning is displayed to the user
|
# the ticket is not created and a warning is displayed to the user
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertTrue(b"User characteristics non allowed" in response.content)
|
self.assertTrue(b"User characteristics not allowed" in response.content)
|
||||||
|
|
||||||
# same but with rectriction that a valid upon the test user attributes
|
# same but with rectriction that a valid upon the test user attributes
|
||||||
response = client.get("/login", {'service': self.service_filter_success})
|
response = client.get("/login", {'service': self.service_filter_success})
|
||||||
@ -546,7 +546,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
|
|||||||
self.assertEqual(data["messages"][0]["level"], "error")
|
self.assertEqual(data["messages"][0]["level"], "error")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
data["messages"][0]["message"],
|
data["messages"][0]["message"],
|
||||||
"Service https://www.example.org non allowed."
|
"Service https://www.example.org not allowed."
|
||||||
)
|
)
|
||||||
|
|
||||||
@override_settings(CAS_ENABLE_AJAX_AUTH=True)
|
@override_settings(CAS_ENABLE_AJAX_AUTH=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user