Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
a93fc41b
Commit
a93fc41b
authored
May 27, 2013
by
Kostas Papadimitriou
Browse files
astakos: Update tests
GET is not allowed to remove auth provider urls
parent
a040e1d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/tests/auth.py
View file @
a93fc41b
...
...
@@ -287,12 +287,15 @@ class ShibbolethTests(TestCase):
r
=
client
.
get
(
"/im/login/shibboleth?"
,
follow
=
True
)
client
.
reset_tokens
()
# TODO: this view should use POST
r
=
client
.
get
(
remove_local_url
)
# only POST is allowed (for CSRF protection)
r
=
client
.
get
(
remove_local_url
,
follow
=
True
)
self
.
assertEqual
(
r
.
status_code
,
405
)
r
=
client
.
post
(
remove_local_url
,
follow
=
True
)
# 2 providers left
self
.
assertEqual
(
user
.
auth_providers
.
count
(),
1
)
# cannot remove last provider
r
=
client
.
ge
t
(
remove_shibbo_url
)
r
=
client
.
pos
t
(
remove_shibbo_url
)
self
.
assertEqual
(
r
.
status_code
,
403
)
self
.
client
.
logout
()
...
...
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