1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

s4 unittests: add unit tests for upgradehelpers

The functions tested are:
* construct_existor_expr
* search_constructed_attrs_stored

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
This commit is contained in:
Matthieu Patou
2010-06-15 12:53:18 +04:00
committed by Jelmer Vernooij
parent 75389cecdd
commit 59f17f9e64
2 changed files with 19 additions and 4 deletions

View File

@ -26,7 +26,7 @@ from samba.provision import getpolicypath
from samba.upgradehelpers import (get_paths, get_ldbs,
find_provision_key_parameters, identic_rename,
updateOEMInfo, getOEMInfo, update_gpo,
delta_update_basesamdb)
delta_update_basesamdb,search_constructed_attrs_stored)
from samba.tests.provision import create_dummy_secretsdb
from samba import param
@ -82,6 +82,12 @@ class UpgradeProvisionWithLdbTestCase(TestCaseInTempDir):
self.referencedb = create_dummy_secretsdb(
os.path.join(self.tempdir, "ref.ldb"))
def test_search_constructed_attrs_stored(self):
hashAtt = search_constructed_attrs_stored(self.ldbs.sam,
self.names.rootdn,
["msds-KeyVersionNumber"])
self.assertFalse(hashAtt.has_key("msds-KeyVersionNumber"))
def test_identic_rename(self):
rootdn = "DC=samba,DC=example,DC=com"