summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-03-17 20:18:21 -0400
committerSimo Sorce <simo@redhat.com>2015-03-17 20:37:55 -0400
commit2b9b1190fdca8dc94d0a7d7f5f00d8084f729127 (patch)
treee39a5859a0d305e12085816edfc059be0417a288
parent0b40c36998ed29c7e98a8cf5f42a798e0bec0870 (diff)
downloadipsilon-2b9b1190fdca8dc94d0a7d7f5f00d8084f729127.tar.gz
ipsilon-2b9b1190fdca8dc94d0a7d7f5f00d8084f729127.tar.xz
ipsilon-2b9b1190fdca8dc94d0a7d7f5f00d8084f729127.zip
Add negative authentication test
Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Nathan Kinder <nkinder@redhat.com>
-rwxr-xr-xtests/test1.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test1.py b/tests/test1.py
index 34b9c88..8589f38 100755
--- a/tests/test1.py
+++ b/tests/test1.py
@@ -143,3 +143,13 @@ if __name__ == '__main__':
print >> sys.stderr, " ERROR: %s" % repr(e)
sys.exit(1)
print " SUCCESS"
+
+ print "test1: Try authentication failure ...",
+ newsess = HttpSessions()
+ newsess.add_server(idpname, 'http://127.0.0.10:45080', user, 'wrong')
+ try:
+ newsess.auth_to_idp(idpname)
+ print >> sys.stderr, " ERROR: Authentication should have failed"
+ sys.exit(1)
+ except Exception, e: # pylint: disable=broad-except
+ print " SUCCESS"