[test] add a test to ensure we get an AuthenticationError with ldapfeed
authorDavid Douard <david.douard@logilab.fr>
Wed, 25 May 2016 17:43:53 +0200
changeset 11262 25f9a76ddf50
parent 11261 9e926f2dc84d
child 11263 9ae85b069325
[test] add a test to ensure we get an AuthenticationError with ldapfeed when using (correct login, wrong password) credentials
server/test/unittest_ldapsource.py
--- a/server/test/unittest_ldapsource.py	Fri Apr 22 16:16:09 2016 +0200
+++ b/server/test/unittest_ldapsource.py	Wed May 25 17:43:53 2016 +0200
@@ -234,6 +234,8 @@
             # ensure we won't be logged against
             self.assertRaises(AuthenticationError,
                               source.authenticate, cnx, 'toto', 'toto')
+            self.assertRaises(AuthenticationError,
+                              source.authenticate, cnx, 'syt', 'toto')
             self.assertTrue(source.authenticate(cnx, 'syt', 'syt'))
         sessionid = self.repo.connect('syt', password='syt')
         self.assertTrue(sessionid)