Revision 17138f12 snf-astakos-app/astakos/im/tests/auth.py
b/snf-astakos-app/astakos/im/tests/auth.py | ||
---|---|---|
287 | 287 |
r = client.get("/im/login/shibboleth?", follow=True) |
288 | 288 |
client.reset_tokens() |
289 | 289 |
|
290 |
# TODO: this view should use POST |
|
291 |
r = client.get(remove_local_url) |
|
290 |
# only POST is allowed (for CSRF protection) |
|
291 |
r = client.get(remove_local_url, follow=True) |
|
292 |
self.assertEqual(r.status_code, 405) |
|
293 |
|
|
294 |
r = client.post(remove_local_url, follow=True) |
|
292 | 295 |
# 2 providers left |
293 | 296 |
self.assertEqual(user.auth_providers.count(), 1) |
294 | 297 |
# cannot remove last provider |
295 |
r = client.get(remove_shibbo_url)
|
|
298 |
r = client.post(remove_shibbo_url)
|
|
296 | 299 |
self.assertEqual(r.status_code, 403) |
297 | 300 |
self.client.logout() |
298 | 301 |
|
Also available in: Unified diff