From 31afad5ee9d9b333528583d7feeb13dd3b50ef91 Mon Sep 17 00:00:00 2001 From: kakwa Date: Fri, 22 May 2015 01:33:15 +0200 Subject: [PATCH] implement unit test on auth test --- tests/test_BackendLdap.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_BackendLdap.py b/tests/test_BackendLdap.py index 201c725..177cc8d 100644 --- a/tests/test_BackendLdap.py +++ b/tests/test_BackendLdap.py @@ -75,11 +75,13 @@ class TestError(object): def testAuthSuccess(self): inv = Backend(cfg, cherrypy.log, 'ldap') - return True + ret = inv.auth('jwatson', 'passwordwatson') + assert ret == True def testAuthFailure(self): inv = Backend(cfg, cherrypy.log, 'ldap') - return True + res = inv.auth('notauser', 'password') or inv.auth('jwatson', 'notapassword') + assert res == False def testMissingParam(self): cfg2 = {}