mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14:21 +01:00
slightly more robust unit tests
pre-cleanup to avoid contamination if other tests fail
This commit is contained in:
parent
dc60300a29
commit
30c28c5feb
@ -119,10 +119,15 @@ class TestError(object):
|
|||||||
@travis_disabled
|
@travis_disabled
|
||||||
def testSearchUser(self):
|
def testSearchUser(self):
|
||||||
inv = Backend(cfg, cherrypy.log, u'test☭', attr, 'sAMAccountName')
|
inv = Backend(cfg, cherrypy.log, u'test☭', attr, 'sAMAccountName')
|
||||||
|
try:
|
||||||
|
inv.del_user(u'☭default_user')
|
||||||
|
except: pass
|
||||||
|
try:
|
||||||
|
inv.del_user(u'☭default_user2')
|
||||||
|
except: pass
|
||||||
try:
|
try:
|
||||||
inv.add_user(default_user.copy())
|
inv.add_user(default_user.copy())
|
||||||
except:
|
except: pass
|
||||||
pass
|
|
||||||
inv.add_user(default_user2.copy())
|
inv.add_user(default_user2.copy())
|
||||||
ret = inv.search(u'test☭')
|
ret = inv.search(u'test☭')
|
||||||
expected = [u'☭default_user', u'☭default_user2']
|
expected = [u'☭default_user', u'☭default_user2']
|
||||||
|
Loading…
Reference in New Issue
Block a user