summaryrefslogtreecommitdiffstats
path: root/tests/helpers
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2015-03-04 17:49:40 -0500
committerRob Crittenden <rcritten@redhat.com>2015-03-16 13:47:45 -0400
commite46c8f615f867d09ce76ee269b0ba81445ad320b (patch)
tree0e8f72b12bc1030ee33a4a52c29e379ae457840e /tests/helpers
parente79330365b0da99c57d22e18df5df0760712ad7f (diff)
downloadipsilon-e46c8f615f867d09ce76ee269b0ba81445ad320b.tar.gz
ipsilon-e46c8f615f867d09ce76ee269b0ba81445ad320b.tar.xz
ipsilon-e46c8f615f867d09ce76ee269b0ba81445ad320b.zip
Add test for multi-SP logout
Create an additional SP, log into one, fetch the other and the client is now logged into both. Log out of the first one and the client is logged out of both. https://fedorahosted.org/ipsilon/ticket/58 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-by: Nathan Kinder <nkinder@redhat.com>
Diffstat (limited to 'tests/helpers')
-rwxr-xr-xtests/helpers/http.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/helpers/http.py b/tests/helpers/http.py
index 07b58b3..cf59853 100755
--- a/tests/helpers/http.py
+++ b/tests/helpers/http.py
@@ -180,7 +180,7 @@ class HttpSessions(object):
return [method, self.new_url(referer, action_url),
{'headers': headers, 'data': payload}]
- def fetch_page(self, idp, target_url):
+ def fetch_page(self, idp, target_url, follow_redirect=True):
url = target_url
action = 'get'
args = {}
@@ -188,6 +188,8 @@ class HttpSessions(object):
while True:
r = self.access(action, url, **args) # pylint: disable=star-args
if r.status_code == 303:
+ if not follow_redirect:
+ return PageTree(r)
url = r.headers['location']
action = 'get'
args = {}