1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

r26596: Fixed upgrade.py.

Added blackbox tests for provision and upgrade Python scripts.
Clean up temporary files created by the Python tests.
(This used to be commit 2227fb6df6)
This commit is contained in:
Jelmer Vernooij
2007-12-25 16:36:44 -06:00
committed by Stefan Metzmacher
parent cea31e3216
commit 533cc583ed
11 changed files with 68 additions and 49 deletions

View File

@@ -67,7 +67,12 @@ class SubstituteVarTestCase(unittest.TestCase):
class LdbExtensionTests(TestCaseInTempDir):
def test_searchone(self):
l = samba.Ldb(self.tempdir + "/searchone.ldb")
l.add({"dn": "foo=dc", "bar": "bla"})
self.assertEquals("bla", l.searchone(ldb.Dn(l, "foo=dc"), "bar"))
path = self.tempdir + "/searchone.ldb"
l = samba.Ldb(path)
try:
l.add({"dn": "foo=dc", "bar": "bla"})
self.assertEquals("bla", l.searchone(ldb.Dn(l, "foo=dc"), "bar"))
finally:
del l
os.unlink(path)