1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

ldb: use base searches for @ special DNs

subtree searches on these DNs don't work any more

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell
2011-07-13 13:05:19 +10:00
parent c60a48948a
commit 2087eb1602
4 changed files with 20 additions and 21 deletions

View File

@ -27,7 +27,7 @@ from samba.upgradehelpers import (usn_in_range, dn_sort,
from samba.tests.provision import create_dummy_secretsdb
from samba.tests import TestCaseInTempDir
from samba import Ldb
from ldb import SCOPE_SUBTREE
from ldb import SCOPE_BASE
import samba.tests
def dummymessage(a=None, b=None):
@ -123,10 +123,8 @@ class UpdateSecretsTests(samba.tests.TestCaseInTempDir):
def test_update_modules(self):
empty_db = self._getEmptyDb()
update_secrets(self.referencedb, empty_db, dummymessage)
newmodules = empty_db.search(
expression="dn=@MODULES", base="", scope=SCOPE_SUBTREE)
refmodules = self.referencedb.search(
expression="dn=@MODULES", base="", scope=SCOPE_SUBTREE)
newmodules = empty_db.search(base="@MODULES", scope=SCOPE_BASE)
refmodules = self.referencedb.search(base="@MODULES", scope=SCOPE_BASE)
self.assertEquals(newmodules.msgs, refmodules.msgs)
def tearDown(self):