]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
PEP8: fix E101: indentation contains mixed spaces and tabs
authorJoe Guo <joeg@catalyst.net.nz>
Mon, 30 Jul 2018 06:13:51 +0000 (18:13 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 24 Aug 2018 05:49:25 +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>
lib/ldb-samba/tests/match_rules.py
source3/build/charset.py
source3/selftest/tests.py
source4/selftest/tests.py
source4/torture/drs/python/getnc_exop.py

index 31132e3568bd82c2ca8a26d99e636e2fbb7df8a6..6757cdfee98944faab5fc650be3f42b41771c76c 100755 (executable)
@@ -38,25 +38,25 @@ class MatchRulesTests(samba.tests.TestCase):
             "dn": self.ou,
             "objectclass": "organizationalUnit"})
 
-       # Add the following OU hierarchy and set otherWellKnownObjects,
-       # which has BinaryDN syntax:
-       #
-       # o1
-       # |--> o2
-       # |    |--> o3
-       # |    |    |-->o4
-
-       self.ldb.add({
-           "dn": "OU=o1,%s" % self.ou,
+        # Add the following OU hierarchy and set otherWellKnownObjects,
+        # which has BinaryDN syntax:
+        #
+        # o1
+        # |--> o2
+        # |    |--> o3
+        # |    |    |-->o4
+
+        self.ldb.add({
+            "dn": "OU=o1,%s" % self.ou,
             "objectclass": "organizationalUnit"})
-       self.ldb.add({
-           "dn": "OU=o2,OU=o1,%s" % self.ou,
+        self.ldb.add({
+            "dn": "OU=o2,OU=o1,%s" % self.ou,
             "objectclass": "organizationalUnit"})
-       self.ldb.add({
-           "dn": "OU=o3,OU=o2,OU=o1,%s" % self.ou,
+        self.ldb.add({
+            "dn": "OU=o3,OU=o2,OU=o1,%s" % self.ou,
             "objectclass": "organizationalUnit"})
-       self.ldb.add({
-           "dn": "OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou,
+        self.ldb.add({
+            "dn": "OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou,
             "objectclass": "organizationalUnit"})
 
         m = Message()
@@ -83,7 +83,7 @@ class MatchRulesTests(samba.tests.TestCase):
                                      FLAG_MOD_ADD, "otherWellKnownObjects")
         self.ldb.modify(m)
 
-       # Create OU for users and groups
+        # Create OU for users and groups
         self.ldb.add({
             "dn": self.ou_users,
             "objectclass": "organizationalUnit"})
@@ -731,26 +731,26 @@ class MatchRulesTests(samba.tests.TestCase):
         self.assertEqual(len(res1), 0)
 
     def test_subtree(self):
-           res1 = self.ldb.search(self.ou,
-                           scope=SCOPE_SUBTREE,
-                           expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
-           self.assertEqual(len(res1), 1)
-           self.assertEqual(str(res1[0].dn).lower(), ("OU=o3,OU=o2,OU=o1,%s" % self.ou).lower())
-
-           res1 = self.ldb.search(self.ou,
-                           scope=SCOPE_ONELEVEL,
-                           expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
-           self.assertEqual(len(res1), 0)
-
-           res1 = self.ldb.search(self.ou,
-                           scope=SCOPE_SUBTREE,
-                           expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
-           self.assertEqual(len(res1), 0)
-
-           res1 = self.ldb.search(self.ou,
-                           scope=SCOPE_ONELEVEL,
-                           expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
-           self.assertEqual(len(res1), 0)
+        res1 = self.ldb.search(self.ou,
+                        scope=SCOPE_SUBTREE,
+                        expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+        self.assertEqual(len(res1), 1)
+        self.assertEqual(str(res1[0].dn).lower(), ("OU=o3,OU=o2,OU=o1,%s" % self.ou).lower())
+
+        res1 = self.ldb.search(self.ou,
+                        scope=SCOPE_ONELEVEL,
+                        expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+        self.assertEqual(len(res1), 0)
+
+        res1 = self.ldb.search(self.ou,
+                        scope=SCOPE_SUBTREE,
+                        expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+        self.assertEqual(len(res1), 0)
+
+        res1 = self.ldb.search(self.ou,
+                        scope=SCOPE_ONELEVEL,
+                        expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+        self.assertEqual(len(res1), 0)
 
     def test_unknown_oid(self):
         res1 = self.ldb.search("cn=g4,%s" % self.ou_groups,
index 003355773614740884d673b63e8d188f50df8fa9..a800eeee447668521809930bd0aa403734a9dcb0 100644 (file)
@@ -22,15 +22,15 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False):
                 default_unix_charset=charset
                 break
 
-       # At this point, we have a libiconv candidate. We know that
-       # we have the right headers and libraries, but we don't know
-       # whether it does the conversions we want. We can't test this
-       # because we are cross-compiling. This is not necessarily a big
-       # deal, since we can't guarantee that the results we get now will
-       # match the results we get at runtime anyway.
-       if crossbuild:
-           default_dos_charset="CP850"
-           default_unix_charset="UTF-8"
+        # At this point, we have a libiconv candidate. We know that
+        # we have the right headers and libraries, but we don't know
+        # whether it does the conversions we want. We can't test this
+        # because we are cross-compiling. This is not necessarily a big
+        # deal, since we can't guarantee that the results we get now will
+        # match the results we get at runtime anyway.
+        if crossbuild:
+            default_dos_charset="CP850"
+            default_unix_charset="UTF-8"
             # TODO: this used to warn about the set charset on cross builds
 
         if default_dos_charset is False or default_unix_charset is False:
index 2d7274c164af788b20cec9ec23a02d451b6d052b..b6b300545dc5253728886580cc026a78a2d915ba 100755 (executable)
@@ -628,7 +628,7 @@ for s in signseal_options:
                                                                                                                               "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
 
 plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
-                                                                      "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
+                                                                       "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
 plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
               [os.path.join(samba3srcdir, "script/tests/test_sharesec.sh"),
                configuration, os.path.join(bindir(), "sharesec"), "tmp"])
index 0af0504d13a6858bf9bbb25c785716f78c8d00df..a41149e31fff64fdefcb7ac1f5f14c9eec95bcc7 100755 (executable)
@@ -842,9 +842,9 @@ plantestsuite_loadlist("samba4.ldap.rodc_rwdc.python(rodc)", "rodc:local",
 
 planoldpythontestsuite("rodc:local", "replica_sync_rodc",
                        extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
-                      name="samba4.drs.replica_sync_rodc.python(rodc)",
-                      environ={'DC1': '$DC_SERVER', 'DC2': '$RODC_DC_SERVER'},
-                      extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+                       name="samba4.drs.replica_sync_rodc.python(rodc)",
+                       environ={'DC1': '$DC_SERVER', 'DC2': '$RODC_DC_SERVER'},
+                       extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
 
 planoldpythontestsuite("ad_dc_ntvfs", "password_settings",
                        extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
@@ -924,13 +924,13 @@ for env in ['rodc', 'offlinebackupdc', 'restoredc', 'renamedc', 'labdc']:
 planpythontestsuite("rodc:local", "samba.tests.samba_tool.rodc")
 
 plantestsuite("samba.blackbox.rpcclient_samlogon", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
-                                                                 "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
+                                                                  "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
 
 plantestsuite("samba.blackbox.rpcclient_samlogon_testallowed", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
-                                                                             "testallowed\ account", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
+                                                                              "testallowed\ account", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
 
 plantestsuite("samba.blackbox.rpcclient_samlogon_testdenied", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
-                                                                            "testdenied", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
+                                                                             "testdenied", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
 
 
 
@@ -995,10 +995,10 @@ for env in ['vampire_dc', 'promoted_dc']:
                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
     planoldpythontestsuite(env, "link_conflicts",
-                          extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
-                          name="samba4.drs.link_conflicts.python(%s)" % env,
-                          environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
-                          extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+                           extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
+                           name="samba4.drs.link_conflicts.python(%s)" % env,
+                           environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
+                           extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
 
 for env in ['vampire_dc', 'promoted_dc', 'vampire_2000_dc']:
     planoldpythontestsuite(env, "repl_schema",
@@ -1012,10 +1012,10 @@ for env in ['vampire_dc', 'promoted_dc', 'vampire_2000_dc']:
 # down) the other DRS tests
 for env in ['vampire_dc', 'promoted_dc']:
     planoldpythontestsuite(env, "getncchanges",
-                          extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
-                          name="samba4.drs.getncchanges.python(%s)" % env,
-                          environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
-                          extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+                           extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
+                           name="samba4.drs.getncchanges.python(%s)" % env,
+                           environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
+                           extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
 
 for env in ['ad_dc_ntvfs']:
     planoldpythontestsuite(env, "repl_rodc",
index 0bb545d78cadcf3a7e296072393e04601be07458..366071c3497651ada306f9503b5db0bdaa56651b 100644 (file)
@@ -141,7 +141,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
 
     def test_do_single_repl(self):
         """
-       Make sure that DRSUAPI_EXOP_REPL_OBJ never replicates more than
+        Make sure that DRSUAPI_EXOP_REPL_OBJ never replicates more than
         one object, even when we use DRS_GET_ANC/GET_TGT.
         """