Use convenience function for finding setup dir in SaMDB tests.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 11 Feb 2009 17:45:51 +0000 (18:45 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 11 Feb 2009 17:45:51 +0000 (18:45 +0100)
source4/scripting/python/samba/tests/samdb.py

index 8b8f178bc479a8f0264bdc1af03a3b10230ff774..434d7a71f2c9e24b677ee6d0537f454a2cd49545 100644 (file)
@@ -19,7 +19,7 @@
 from samba.auth import system_session
 from samba.credentials import Credentials
 import os
 from samba.auth import system_session
 from samba.credentials import Credentials
 import os
-from samba.provision import setup_samdb, guess_names, setup_templatesdb, make_smbconf
+from samba.provision import setup_samdb, guess_names, setup_templatesdb, make_smbconf, find_setup_dir
 from samba.samdb import SamDB
 from samba.tests import cmdline_loadparm, TestCaseInTempDir
 from samba.dcerpc import security
 from samba.samdb import SamDB
 from samba.tests import cmdline_loadparm, TestCaseInTempDir
 from samba.dcerpc import security
@@ -30,7 +30,7 @@ from samba import param
 class SamDBTestCase(TestCaseInTempDir):
 
     def setup_path(self, relpath):
 class SamDBTestCase(TestCaseInTempDir):
 
     def setup_path(self, relpath):
-        return os.path.join("setup", relpath)
+        return os.path.join(find_setup_dir(), relpath)
 
     def setUp(self):
         super(SamDBTestCase, self).setUp()
 
     def setUp(self):
         super(SamDBTestCase, self).setUp()