summaryrefslogtreecommitdiffstats
path: root/tests/helpers/http.py
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2015-04-14 13:00:25 +0200
committerRob Crittenden <rcritten@redhat.com>2015-04-15 10:35:04 -0400
commit800b39df6e2c65fa06a0d5da48002bb26b83b435 (patch)
treea1b1cbe5b437a09dd3796de2318772a89c75cab3 /tests/helpers/http.py
parentf73332fb7d55bd5753a8bafc2493172203fcf377 (diff)
downloadipsilon.git-800b39df6e2c65fa06a0d5da48002bb26b83b435.tar.gz
ipsilon.git-800b39df6e2c65fa06a0d5da48002bb26b83b435.tar.xz
ipsilon.git-800b39df6e2c65fa06a0d5da48002bb26b83b435.zip
Close database sesssions
This will close any opened database sessions at the end of the request. https://fedorahosted.org/ipsilon/ticket/110 Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Rob Crittenden <rcritten@redhat.com>
Diffstat (limited to 'tests/helpers/http.py')
-rwxr-xr-xtests/helpers/http.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/helpers/http.py b/tests/helpers/http.py
index dc7fbd5..2478e2a 100755
--- a/tests/helpers/http.py
+++ b/tests/helpers/http.py
@@ -232,6 +232,15 @@ class HttpSessions(object):
page.expected_value('//div[@id="welcome"]/p/text()',
'Welcome %s!' % srv['user'])
+ def logout_from_idp(self, idp):
+
+ srv = self.servers[idp]
+ target_url = '%s/%s/logout' % (srv['baseuri'], idp)
+
+ r = self.access('get', target_url)
+ if r.status_code != 200:
+ raise ValueError("Logout from idp failed: %s" % repr(r))
+
def get_sp_metadata(self, idp, sp):
idpsrv = self.servers[idp]
idpuri = idpsrv['baseuri']