summaryrefslogtreecommitdiff
path: root/lib/ldb
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-07-30 18:20:39 +1200
committerDouglas Bagnall <dbagnall@samba.org>2018-08-24 07:49:29 +0200
commit211c9a5f85bffbb012b4567bad265c9339588fbf (patch)
treed22f062161bdd07b60c6ac3bd42964ea902a402b /lib/ldb
parent542e91ef9222302303d2ecc10dceb96d1b0d5bab (diff)
downloadsamba-211c9a5f85bffbb012b4567bad265c9339588fbf.tar.gz
PEP8: fix E302: expected 2 blank lines, found 1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'lib/ldb')
-rwxr-xr-xlib/ldb/tests/python/api.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index c88ddc7826e..cd0320715fa 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -22,6 +22,7 @@ MDB_INDEX_OBJ = {
"@IDX_DN_GUID": [b"GUID"]
}
+
def tempdir():
import tempfile
try:
@@ -685,6 +686,8 @@ class SimpleLdb(LdbBaseTest):
self.assertRaises(ldb.LdbError, lambda: l.search("", ldb.SCOPE_SUBTREE, "&(dc=*)(dn=*)", ["dc"]))
# Run the SimpleLdb tests against an lmdb backend
+
+
class SimpleLdbLmdb(SimpleLdb):
def setUp(self):
@@ -695,6 +698,7 @@ class SimpleLdbLmdb(SimpleLdb):
def tearDown(self):
super(SimpleLdbLmdb, self).tearDown()
+
class SearchTests(LdbBaseTest):
def tearDown(self):
shutil.rmtree(self.testdir)
@@ -1367,6 +1371,7 @@ class IndexedSearchTests(SearchTests):
"@IDXATTR": [b"x", b"y", b"ou"]})
self.IDX = True
+
class IndexedCheckSearchTests(IndexedSearchTests):
"""Test searches using the index, to ensure the index doesn't
break things (full scan disabled)"""
@@ -1375,6 +1380,7 @@ class IndexedCheckSearchTests(IndexedSearchTests):
self.IDXCHECK = True
super(IndexedCheckSearchTests, self).setUp()
+
class IndexedSearchDnFilterTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
@@ -1389,6 +1395,7 @@ class IndexedSearchDnFilterTests(SearchTests):
"@IDXATTR": [b"x", b"y", b"ou"]})
self.IDX = True
+
class IndexedAndOneLevelSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
@@ -1401,6 +1408,7 @@ class IndexedAndOneLevelSearchTests(SearchTests):
self.IDX = True
self.IDXONE = True
+
class IndexedCheckedAndOneLevelSearchTests(IndexedAndOneLevelSearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things (full scan disabled)"""
@@ -1409,6 +1417,7 @@ class IndexedCheckedAndOneLevelSearchTests(IndexedAndOneLevelSearchTests):
self.IDXCHECK = True
super(IndexedCheckedAndOneLevelSearchTests, self).setUp()
+
class IndexedAndOneLevelDNFilterSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
@@ -1427,6 +1436,7 @@ class IndexedAndOneLevelDNFilterSearchTests(SearchTests):
self.IDX = True
self.IDXONE = True
+
class GUIDIndexedSearchTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
@@ -1460,6 +1470,7 @@ class GUIDIndexedDNFilterSearchTests(SearchTests):
self.IDX = True
self.IDXGUID = True
+
class GUIDAndOneLevelIndexedSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
@@ -1479,6 +1490,7 @@ class GUIDAndOneLevelIndexedSearchTests(SearchTests):
self.IDXGUID = True
self.IDXONE = True
+
class GUIDIndexedSearchTestsLmdb(GUIDIndexedSearchTests):
def setUp(self):
@@ -1719,6 +1731,7 @@ class AddModifyTestsLmdb(AddModifyTests):
def tearDown(self):
super(AddModifyTestsLmdb, self).tearDown()
+
class IndexedAddModifyTests(AddModifyTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
@@ -1798,6 +1811,7 @@ class IndexedAddModifyTests(AddModifyTests):
"x": "z", "y": "a",
"objectUUID": b"0123456789abcde2"})
+
class GUIDIndexedAddModifyTests(IndexedAddModifyTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
@@ -1822,6 +1836,7 @@ class GUIDTransIndexedAddModifyTests(GUIDIndexedAddModifyTests):
self.l.transaction_commit()
super(GUIDTransIndexedAddModifyTests, self).tearDown()
+
class TransIndexedAddModifyTests(IndexedAddModifyTests):
"""Test index behaviour insdie the transaction"""
@@ -1833,6 +1848,7 @@ class TransIndexedAddModifyTests(IndexedAddModifyTests):
self.l.transaction_commit()
super(TransIndexedAddModifyTests, self).tearDown()
+
class GuidIndexedAddModifyTestsLmdb(GUIDIndexedAddModifyTests):
def setUp(self):
@@ -1842,6 +1858,7 @@ class GuidIndexedAddModifyTestsLmdb(GUIDIndexedAddModifyTests):
def tearDown(self):
super(GuidIndexedAddModifyTestsLmdb, self).tearDown()
+
class GuidTransIndexedAddModifyTestsLmdb(GUIDTransIndexedAddModifyTests):
def setUp(self):
@@ -1851,6 +1868,7 @@ class GuidTransIndexedAddModifyTestsLmdb(GUIDTransIndexedAddModifyTests):
def tearDown(self):
super(GuidTransIndexedAddModifyTestsLmdb, self).tearDown()
+
class BadIndexTests(LdbBaseTest):
def setUp(self):
super(BadIndexTests, self).setUp()
@@ -2011,6 +2029,7 @@ class GUIDBadIndexTests(BadIndexTests):
super(GUIDBadIndexTests, self).setUp()
+
class DnTests(TestCase):
def setUp(self):
@@ -2253,6 +2272,7 @@ class DnTests(TestCase):
dn = ldb.Dn(self.ldb, '')
self.assertTrue(dn.is_null())
+
class LdbMsgTests(TestCase):
def setUp(self):
@@ -2621,6 +2641,7 @@ class ModuleTests(TestCase):
l = ldb.Ldb(self.filename)
self.assertEqual(["init"], ops)
+
class LdbResultTests(LdbBaseTest):
def setUp(self):