1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

tests dsdb: load paramaters from test environment

Load the test environment specific parameters

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Apr  6 10:06:05 CEST 2017 on sn-devel-144
This commit is contained in:
Gary Lockyer 2017-04-04 08:56:47 +12:00 committed by Andrew Bartlett
parent 62bbfda867
commit 5ee494cbd7

View File

@ -32,16 +32,13 @@ class DsdbTests(TestCase):
def setUp(self):
super(DsdbTests, self).setUp()
self.lp = samba.param.LoadParm()
self.lp.load(os.path.join(os.path.join(self.baseprovpath(), "etc"), "smb.conf"))
self.lp = samba.tests.env_loadparm()
self.creds = Credentials()
self.creds.guess(self.lp)
self.session = system_session()
self.samdb = SamDB(os.path.join(self.baseprovpath(), "private", "sam.ldb"),
session_info=self.session, credentials=self.creds,lp=self.lp)
def baseprovpath(self):
return os.path.join(os.environ['SELFTEST_PREFIX'], "ad_dc_ntvfs")
self.samdb = SamDB(session_info=self.session,
credentials=self.creds,
lp=self.lp)
def test_get_oid_from_attrid(self):
oid = self.samdb.get_oid_from_attid(591614)