From 2b9b1190fdca8dc94d0a7d7f5f00d8084f729127 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 17 Mar 2015 20:18:21 -0400 Subject: Add negative authentication test Signed-off-by: Simo Sorce Reviewed-by: Nathan Kinder --- tests/test1.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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" -- cgit