summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/ldb/tests/python/api.py16
-rwxr-xr-xlib/ldb/tests/python/index.py1
-rw-r--r--python/samba/dbchecker.py2
-rw-r--r--python/samba/gp_ext_loader.py2
-rwxr-xr-xpython/samba/tests/dcerpc/raw_protocol.py2
-rw-r--r--python/samba/tests/netbios.py2
-rw-r--r--python/samba/tests/py_credentials.py3
-rw-r--r--python/samba/tests/samba_tool/user.py1
-rw-r--r--python/samba/tests/samba_tool/user_wdigest.py3
-rw-r--r--python/samba/tests/samdb_api.py2
-rw-r--r--source4/dsdb/tests/python/ad_dc_search_performance.py2
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py2
-rw-r--r--source4/dsdb/tests/python/sort.py1
-rw-r--r--source4/lib/wmi/wmi.py3
14 files changed, 42 insertions, 0 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 423b434d4d3..c88ddc7826e 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -1360,6 +1360,7 @@ class SearchTestsLmdb(SearchTests):
class IndexedSearchTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
+
def setUp(self):
super(IndexedSearchTests, self).setUp()
self.l.add({"dn": "@INDEXLIST",
@@ -1369,6 +1370,7 @@ class IndexedSearchTests(SearchTests):
class IndexedCheckSearchTests(IndexedSearchTests):
"""Test searches using the index, to ensure the index doesn't
break things (full scan disabled)"""
+
def setUp(self):
self.IDXCHECK = True
super(IndexedCheckSearchTests, self).setUp()
@@ -1376,6 +1378,7 @@ class IndexedCheckSearchTests(IndexedSearchTests):
class IndexedSearchDnFilterTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
+
def setUp(self):
super(IndexedSearchDnFilterTests, self).setUp()
self.l.add({"dn": "@OPTIONS",
@@ -1389,6 +1392,7 @@ class IndexedSearchDnFilterTests(SearchTests):
class IndexedAndOneLevelSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
+
def setUp(self):
super(IndexedAndOneLevelSearchTests, self).setUp()
self.l.add({"dn": "@INDEXLIST",
@@ -1400,6 +1404,7 @@ class IndexedAndOneLevelSearchTests(SearchTests):
class IndexedCheckedAndOneLevelSearchTests(IndexedAndOneLevelSearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things (full scan disabled)"""
+
def setUp(self):
self.IDXCHECK = True
super(IndexedCheckedAndOneLevelSearchTests, self).setUp()
@@ -1407,6 +1412,7 @@ class IndexedCheckedAndOneLevelSearchTests(IndexedAndOneLevelSearchTests):
class IndexedAndOneLevelDNFilterSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
+
def setUp(self):
super(IndexedAndOneLevelDNFilterSearchTests, self).setUp()
self.l.add({"dn": "@OPTIONS",
@@ -1424,6 +1430,7 @@ class IndexedAndOneLevelDNFilterSearchTests(SearchTests):
class GUIDIndexedSearchTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
+
def setUp(self):
self.index = {"dn": "@INDEXLIST",
"@IDXATTR": [b"x", b"y", b"ou"],
@@ -1438,6 +1445,7 @@ class GUIDIndexedSearchTests(SearchTests):
class GUIDIndexedDNFilterSearchTests(SearchTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
+
def setUp(self):
self.index = {"dn": "@INDEXLIST",
"@IDXATTR": [b"x", b"y", b"ou"],
@@ -1455,6 +1463,7 @@ class GUIDIndexedDNFilterSearchTests(SearchTests):
class GUIDAndOneLevelIndexedSearchTests(SearchTests):
"""Test searches using the index including @IDXONE, to ensure
the index doesn't break things"""
+
def setUp(self):
self.index = {"dn": "@INDEXLIST",
"@IDXATTR": [b"x", b"y", b"ou"],
@@ -1713,6 +1722,7 @@ class AddModifyTestsLmdb(AddModifyTests):
class IndexedAddModifyTests(AddModifyTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
+
def setUp(self):
if not hasattr(self, 'index'):
self.index = {"dn": "@INDEXLIST",
@@ -1791,6 +1801,7 @@ class IndexedAddModifyTests(AddModifyTests):
class GUIDIndexedAddModifyTests(IndexedAddModifyTests):
"""Test searches using the index, to ensure the index doesn't
break things"""
+
def setUp(self):
self.index = {"dn": "@INDEXLIST",
"@IDXATTR": [b"x", b"y", b"ou"],
@@ -1802,6 +1813,7 @@ class GUIDIndexedAddModifyTests(IndexedAddModifyTests):
class GUIDTransIndexedAddModifyTests(GUIDIndexedAddModifyTests):
"""Test GUID index behaviour insdie the transaction"""
+
def setUp(self):
super(GUIDTransIndexedAddModifyTests, self).setUp()
self.l.transaction_start()
@@ -1812,6 +1824,7 @@ class GUIDTransIndexedAddModifyTests(GUIDIndexedAddModifyTests):
class TransIndexedAddModifyTests(IndexedAddModifyTests):
"""Test index behaviour insdie the transaction"""
+
def setUp(self):
super(TransIndexedAddModifyTests, self).setUp()
self.l.transaction_start()
@@ -1992,6 +2005,7 @@ class BadIndexTests(LdbBaseTest):
class GUIDBadIndexTests(BadIndexTests):
"""Test Bad index things with GUID index mode"""
+
def setUp(self):
self.IDXGUID = True
@@ -2723,6 +2737,8 @@ class LdbResultTests(LdbBaseTest):
# Show that search results can't see into a transaction
+
+
def test_search_against_trans(self):
found11 = False
diff --git a/lib/ldb/tests/python/index.py b/lib/ldb/tests/python/index.py
index ecd61451f46..72b99551a9b 100755
--- a/lib/ldb/tests/python/index.py
+++ b/lib/ldb/tests/python/index.py
@@ -908,6 +908,7 @@ class MaxIndexKeyLengthTests(LdbBaseTest):
# Test adding to non unique index with identical multivalued index
# attributes
#
+
def test_index_multi_valued_identical_keys(self):
# 0 1 2 3 4 5
# 12345678901234567890123456789012345678901234567890
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index b8cf2b8308e..aad0fecdcdf 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -2506,6 +2506,8 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
###############################################
# re-index the database
+
+
def reindex_database(self):
'''re-index the whole database'''
m = ldb.Message()
diff --git a/python/samba/gp_ext_loader.py b/python/samba/gp_ext_loader.py
index 61cc29b788c..23fee230440 100644
--- a/python/samba/gp_ext_loader.py
+++ b/python/samba/gp_ext_loader.py
@@ -20,6 +20,7 @@ from samba.gpclass import gp_ext
try:
import importlib.util
+
def import_file(name, location):
spec = importlib.util.spec_from_file_location(name, location)
module = importlib.util.module_from_spec(spec)
@@ -27,6 +28,7 @@ try:
return module
except ImportError:
import imp
+
def import_file(name, location):
return imp.load_source(name, location)
diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py
index 4f28affaa44..f4ba1fbe33d 100755
--- a/python/samba/tests/dcerpc/raw_protocol.py
+++ b/python/samba/tests/dcerpc/raw_protocol.py
@@ -1836,6 +1836,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
return self._test_neg_xmit_check_values(req_xmit=3199,
req_recv=0,
rep_both=2048)
+
def test_neg_xmit_0_3199(self):
return self._test_neg_xmit_check_values(req_xmit=0,
req_recv=3199,
@@ -1845,6 +1846,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
return self._test_neg_xmit_check_values(req_xmit=3199,
req_recv=0xffff,
rep_both=3192)
+
def test_neg_xmit_ffff_3199(self):
return self._test_neg_xmit_check_values(req_xmit=0xffff,
req_recv=3199,
diff --git a/python/samba/tests/netbios.py b/python/samba/tests/netbios.py
index 929c36e9ef2..f2882ebe2e6 100644
--- a/python/samba/tests/netbios.py
+++ b/python/samba/tests/netbios.py
@@ -24,8 +24,10 @@ class NetBiosTests(samba.tests.TestCase):
self.n = netbios.Node()
self.ifc = os.environ["SERVER_IP"]
self.dc = os.environ["DC_NETBIOSNAME"]
+
def tearDown(self):
super(NetBiosTests, self).tearDown()
+
def test_query_name(self):
(reply_from, names, addresses) = self.n.query_name(self.dc, self.ifc, timeout=4)
assert reply_from == self.ifc
diff --git a/python/samba/tests/py_credentials.py b/python/samba/tests/py_credentials.py
index 1678cecdba3..c2091e49825 100644
--- a/python/samba/tests/py_credentials.py
+++ b/python/samba/tests/py_credentials.py
@@ -214,6 +214,8 @@ class PyCredentialsTests(TestCase):
# Test Credentials.encrypt_netr_crypt_password
# By performing a NetrServerPasswordSet2
# And the logging on using the new password.
+
+
def test_encrypt_netr_password(self):
# Change the password
self.do_Netr_ServerPasswordSet2()
@@ -226,6 +228,7 @@ class PyCredentialsTests(TestCase):
# Change the current machine account password with a
# netr_ServerPasswordSet2 call.
+
def do_Netr_ServerPasswordSet2(self):
c = self.get_netlogon_connection()
(authenticator, subsequent) = self.get_authenticator(c)
diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py
index 4d39e822720..0cd283f2ad4 100644
--- a/python/samba/tests/samba_tool/user.py
+++ b/python/samba/tests/samba_tool/user.py
@@ -565,6 +565,7 @@ sAMAccountName: %s
"--company=%s" % user["company"],
"-H", "ldap://%s" % os.environ["DC_SERVER"],
"-U%s%%%s" % (os.environ["DC_USERNAME"], os.environ["DC_PASSWORD"]))
+
def _create_posix_user(self, user):
""" create a new user with RFC2307 attributes """
return self.runsubcmd("user", "create", user["name"], user["password"],
diff --git a/python/samba/tests/samba_tool/user_wdigest.py b/python/samba/tests/samba_tool/user_wdigest.py
index 22591ffe4a6..a6f83edb631 100644
--- a/python/samba/tests/samba_tool/user_wdigest.py
+++ b/python/samba/tests/samba_tool/user_wdigest.py
@@ -275,6 +275,8 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
# UPPER(DNSDomainName),
# password)
#
+
+
def test_Wdigest14(self):
attribute = "virtualWDigest14"
expected = calc_digest(USER_NAME.lower(),
@@ -420,6 +422,7 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
# "Digest",
# password)
#
+
def test_Wdigest27(self):
attribute = "virtualWDigest27"
name = "%s\\%s" % (self.netbios_domain, USER_NAME)
diff --git a/python/samba/tests/samdb_api.py b/python/samba/tests/samdb_api.py
index c57da62410f..95f2df5ee7f 100644
--- a/python/samba/tests/samdb_api.py
+++ b/python/samba/tests/samdb_api.py
@@ -153,6 +153,8 @@ class SamDBApiTestCase(TestCaseInTempDir):
#
# Should successful open the SamDB creating a new database file.
#
+
+
def test_create_db_new_file(self):
SamDB(url="tdb://" + self.tempdir + "/test.db", flags=0)
existing = open(self.tempdir + "/test.db", mode="rb")
diff --git a/source4/dsdb/tests/python/ad_dc_search_performance.py b/source4/dsdb/tests/python/ad_dc_search_performance.py
index e2469461644..26cee2ef020 100644
--- a/source4/dsdb/tests/python/ad_dc_search_performance.py
+++ b/source4/dsdb/tests/python/ad_dc_search_performance.py
@@ -271,6 +271,7 @@ class UserTests(samba.tests.TestCase):
test_01_10_complex_search_3k_users = _test_complex_search
test_01_11_unindexed_search_3k_users = _test_unindexed_search
test_01_12_indexed_search_3k_users = _test_indexed_search
+
def test_01_13_member_search_3k_users(self):
self._test_member_search(rounds=5)
@@ -281,6 +282,7 @@ class UserTests(samba.tests.TestCase):
test_03_10_complex_search_linked_users = _test_complex_search
test_03_11_unindexed_search_linked_users = _test_unindexed_search
test_03_12_indexed_search_linked_users = _test_indexed_search
+
def test_03_13_member_search_linked_users(self):
self._test_member_search(rounds=2)
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 8dec06f1acf..33dd0405721 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -1373,6 +1373,8 @@ class BasicTests(samba.tests.TestCase):
# this test needs to be disabled until we really understand
# what the rDN length constraints are
+
+
def DISABLED_test_largeRDN(self):
"""Testing large rDN (limit 64 characters)"""
rdn = "CN=a012345678901234567890123456789012345678901234567890123456789012"
diff --git a/source4/dsdb/tests/python/sort.py b/source4/dsdb/tests/python/sort.py
index f9b6c4cd789..6eef4c03689 100644
--- a/source4/dsdb/tests/python/sort.py
+++ b/source4/dsdb/tests/python/sort.py
@@ -345,6 +345,7 @@ class BaseSortTests(samba.tests.TestCase):
class SimpleSortTests(BaseSortTests):
avoid_tricky_sort = True
+
def test_server_sort_different_attr(self):
self._test_server_sort_different_attr()
diff --git a/source4/lib/wmi/wmi.py b/source4/lib/wmi/wmi.py
index 7da465b0b70..54d806bdf7f 100644
--- a/source4/lib/wmi/wmi.py
+++ b/source4/lib/wmi/wmi.py
@@ -61,6 +61,7 @@ WBEM_ConnectServer = _wmi.WBEM_ConnectServer
class IUnknown(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
+
def __init__(self, *args, **kwargs):
_wmi.IUnknown_swiginit(self, _wmi.new_IUnknown(*args, **kwargs))
__swig_destroy__ = _wmi.delete_IUnknown
@@ -71,6 +72,7 @@ IUnknown_swigregister(IUnknown)
class IWbemServices(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
+
def __init__(self, *args, **kwargs):
_wmi.IWbemServices_swiginit(self, _wmi.new_IWbemServices(*args, **kwargs))
__swig_destroy__ = _wmi.delete_IWbemServices
@@ -83,6 +85,7 @@ IWbemServices_swigregister(IWbemServices)
class IEnumWbemClassObject(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
+
def __init__(self, *args, **kwargs):
_wmi.IEnumWbemClassObject_swiginit(self, _wmi.new_IEnumWbemClassObject(*args, **kwargs))
__swig_destroy__ = _wmi.delete_IEnumWbemClassObject