diff options
author | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-08-19 22:47:47 +0200 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-08-19 23:58:59 +0200 |
commit | bfc48558d57b119c4102c481b765fc5a379674da (patch) | |
tree | 19de73cc1a77ce6d9330831f025620d0bed92cea /okupy/tests | |
parent | Merge pull request #71 from tampakrap/tests (diff) | |
download | identity.gentoo.org-bfc48558d57b119c4102c481b765fc5a379674da.tar.gz identity.gentoo.org-bfc48558d57b119c4102c481b765fc5a379674da.tar.bz2 identity.gentoo.org-bfc48558d57b119c4102c481b765fc5a379674da.zip |
add test to ensure that anon gets redirected to requested next URL
Diffstat (limited to 'okupy/tests')
-rw-r--r-- | okupy/tests/integration/test_login.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/okupy/tests/integration/test_login.py b/okupy/tests/integration/test_login.py index ab3d515..ef399ad 100644 --- a/okupy/tests/integration/test_login.py +++ b/okupy/tests/integration/test_login.py @@ -58,3 +58,8 @@ class LoginIntegrationTests(TestCase): response = self.client.get('/logout/') self.assertRedirects(response, '/login/', 302, 200) self.mockldap.start() + + def test_redirect_to_requested_page_after_login(self): + self.ldapobject.search_s.seed(settings.AUTH_LDAP_USER_BASE_DN, 2, set_search_seed('alice'))([ldap_users('alice')]) + response = self.client.post('/login/?next=/otp-setup/', vars.LOGIN_ALICE) + self.assertRedirects(response, '/otp-setup/', 302, 200) |