Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
django-cas-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Samir
django-cas-server
Commits
cd57f101
Commit
cd57f101
authored
Aug 24, 2016
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix english typos in tests
parent
e8d893be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
cas_server/tests/test_view.py
cas_server/tests/test_view.py
+5
-5
No files found.
cas_server/tests/test_view.py
View file @
cd57f101
...
...
@@ -234,7 +234,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
response
=
client
.
get
(
"/login?service=https://www.example.net"
)
self
.
assertEqual
(
response
.
status_code
,
200
)
# we warn the user that https://www.example.net is not an allowed service url
self
.
assertTrue
(
b
"Service https://www.example.net no
n
allowed"
in
response
.
content
)
self
.
assertTrue
(
b
"Service https://www.example.net no
t
allowed"
in
response
.
content
)
def
test_view_login_get_auth_allowed_service
(
self
):
"""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
)
# we warn the user that https://www.example.net is not an allowed service url
# NO ticket are created
self
.
assertTrue
(
b
"Service https://www.example.org no
n
allowed"
in
response
.
content
)
self
.
assertTrue
(
b
"Service https://www.example.org no
t
allowed"
in
response
.
content
)
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"""
...
...
@@ -314,7 +314,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin):
response
=
client
.
get
(
"/login"
,
{
'service'
:
self
.
service_restrict_user_fail
})
self
.
assertEqual
(
response
.
status_code
,
200
)
# the ticket is not created and a warning is displayed to the user
self
.
assertTrue
(
b
"Username no
n
allowed"
in
response
.
content
)
self
.
assertTrue
(
b
"Username no
t
allowed"
in
response
.
content
)
# same but with the tes user username being one of the allowed usernames
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
})
# the ticket is not created and a warning is displayed to the user
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertTrue
(
b
"User characteristics no
n
allowed"
in
response
.
content
)
self
.
assertTrue
(
b
"User characteristics no
t
allowed"
in
response
.
content
)
# same but with rectriction that a valid upon the test user attributes
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
][
"message"
],
"Service https://www.example.org no
n
allowed."
"Service https://www.example.org no
t
allowed."
)
@
override_settings
(
CAS_ENABLE_AJAX_AUTH
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment