PEP8: fix E301: expected 1 blank line, found 0
authorJoe Guo <joeg@catalyst.net.nz>
Mon, 30 Jul 2018 06:19:59 +0000 (18:19 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 24 Aug 2018 05:49:29 +0000 (07:49 +0200)
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>
14 files changed:
lib/ldb/tests/python/api.py
lib/ldb/tests/python/index.py
python/samba/dbchecker.py
python/samba/gp_ext_loader.py
python/samba/tests/dcerpc/raw_protocol.py
python/samba/tests/netbios.py
python/samba/tests/py_credentials.py
python/samba/tests/samba_tool/user.py
python/samba/tests/samba_tool/user_wdigest.py
python/samba/tests/samdb_api.py
source4/dsdb/tests/python/ad_dc_search_performance.py
source4/dsdb/tests/python/ldap.py
source4/dsdb/tests/python/sort.py
source4/lib/wmi/wmi.py

index 423b434d4d3fc27bfe27ef8b12b7e6e13cf3b747..c88ddc7826ef56503b7c8126ed583c3b87dc6119 100755 (executable)
@@ -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
 
index ecd61451f4683f43440f34a38582f0ad0773397d..72b99551a9b881cab5dfcd0a7310a9cebaff6004 100755 (executable)
@@ -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
index b8cf2b8308e1756f83632e1fee08032398ba4bf2..aad0fecdcdfdcaf7a10cf91657ba38d5b8c23a4a 100644 (file)
@@ -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()
index 61cc29b788ce275a5b72e0d52b92935ee6051037..23fee230440c2b4a8576d36fd9f6cce811e2d7ba 100644 (file)
@@ -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)
 
index 4f28affaa44a9809fde340763edf17a2607e9f75..f4ba1fbe33d4d7c308b44ff57a7833ba301c4ee4 100755 (executable)
@@ -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,
index 929c36e9ef231c1464df4dac2fa9ae5aca5fd10e..f2882ebe2e6b90ddd99ed7de30b4be32089bdc15 100644 (file)
@@ -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
index 1678cecdba38a8592f8ad18ba85a511362dcd6f4..c2091e498257bc651c584a4643a637a9ea9da098 100644 (file)
@@ -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)
index 4d39e822720b5053fd3c82d9b0aae1951be1c3d8..0cd283f2ad440a28f70a8cac68563a9cea600e3d 100644 (file)
@@ -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"],
index 22591ffe4a6fca4672d54dc6238c4fedc5c36313..a6f83edb631cd4c6df3543569dd4b1365fee4b7b 100644 (file)
@@ -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)
index c57da62410f28ab1621749cceed4e19035b9c589..95f2df5ee7f6f94c405be37d036b5b0f45814daf 100644 (file)
@@ -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")
index e24694616440071df373d6213325f1d74913f851..26cee2ef020f4ceb90ceb83b9fb76014ddb448c4 100644 (file)
@@ -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)
 
index 8dec06f1acf4c64b8aadd28c59e0b6a35792e00e..33dd04057214ef623dc548750ada07dfd11b4bac 100755 (executable)
@@ -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"
index f9b6c4cd7890a0e7c0b07625e1bd2f24b9c3ae00..6eef4c03689ad72fa03e213f7147952626f11d83 100644 (file)
@@ -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()
 
index 7da465b0b70622e909fed217817ff521634ad127..54d806bdf7f62e349ab91da4885aba1b0c3418cc 100644 (file)
@@ -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