from samba.dcerpc import drsblobs
from samba.compat import get_bytes
from samba.compat import get_string
+from samba.tests import env_loadparm
class UserCmdTestCase(SambaToolCmdTest):
for user in self.users:
if self._find_user(user["name"]):
self.runsubcmd("user", "delete", user["name"])
+ lp = env_loadparm()
+ # second run of this test (e.g. with --extra-python)
+ # the cache is still there and '--cache-ldb-initialize'
+ # will fail
+ cachedb = lp.private_path("user-syncpasswords-cache.ldb")
+ if os.path.exists(cachedb):
+ os.remove(cachedb)
def test_newuser(self):
# try to add all the users again, this should fail