Commit a93fc41b authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

astakos: Update tests

GET is not allowed to remove auth provider urls
parent a040e1d0
......@@ -287,12 +287,15 @@ class ShibbolethTests(TestCase):
r = client.get("/im/login/shibboleth?", follow=True)
# 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 =, follow=True)
# 2 providers left
self.assertEqual(user.auth_providers.count(), 1)
# cannot remove last provider
r = client.get(remove_shibbo_url)
r =
self.assertEqual(r.status_code, 403)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment