diff options
author | Stefan Metzmacher <metze@samba.org> | 2018-01-30 10:39:30 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-02-09 09:30:21 +0100 |
commit | 659e39009ce281bf67dba522df9e771e8e8e98fe (patch) | |
tree | 425317788f4692f100d0421e6057818df1b868aa /python/samba | |
parent | 849a688062241b50f5cde5af6ead7c3516e9a716 (diff) | |
download | samba-659e39009ce281bf67dba522df9e771e8e8e98fe.tar.gz |
python:tests: use TestCaseInTempDir for "samba.tests.common"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 681e0a1745b45c6ac22d394b9e78cb67007d7dc4)
Diffstat (limited to 'python/samba')
-rw-r--r-- | python/samba/tests/common.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/samba/tests/common.py b/python/samba/tests/common.py index 8794e9dc8b3..33c7270897a 100644 --- a/python/samba/tests/common.py +++ b/python/samba/tests/common.py @@ -23,7 +23,7 @@ from samba.common import * from samba.samdb import SamDB -class CommonTests(samba.tests.TestCase): +class CommonTests(samba.tests.TestCaseInTempDir): def test_normalise_int32(self): self.assertEquals('17', normalise_int32(17)) @@ -32,9 +32,10 @@ class CommonTests(samba.tests.TestCase): self.assertEquals('-1294967296', normalise_int32('3000000000')) def test_dsdb_Dn(self): - sam = samba.Ldb(url='dntest.ldb') + url = self.tempdir + "/test_dsdb_Dn.ldb" + sam = samba.Ldb(url=url) dn1 = dsdb_Dn(sam, "DC=foo,DC=bar") dn2 = dsdb_Dn(sam, "B:8:0000000D:<GUID=b3f0ec29-17f4-452a-b002-963e1909d101>;DC=samba,DC=example,DC=com") self.assertEquals(dn2.binary, "0000000D") self.assertEquals(13, dn2.get_binary_integer()) - os.unlink('dntest.ldb') + os.unlink(url) |