tests blackbox ndrdump: Clean up pep8 warnings
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 4 Jun 2019 22:34:17 +0000 (10:34 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Jun 2019 04:58:17 +0000 (04:58 +0000)
Clean up the test code and remove the pep8 warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun  6 04:58:18 UTC 2019 on sn-devel-184

python/samba/tests/blackbox/ndrdump.py

index 7ca7b93f559cb89538ad7cce352c3890e9600e5a..fd1bc832d9beb732294c6f065b5ed027c864f7c3 100644 (file)
@@ -24,7 +24,8 @@ from __future__ import print_function
 import os
 from samba.tests import BlackboxTestCase, BlackboxProcessError
 
-for p in ["../../../../../source4/librpc/tests", "../../../../../librpc/tests"]:
+for p in ["../../../../../source4/librpc/tests",
+          "../../../../../librpc/tests"]:
     data_path_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), p))
     print(data_path_dir)
     if os.path.exists(data_path_dir):
@@ -38,20 +39,27 @@ class NdrDumpTests(BlackboxTestCase):
         return os.path.join(data_path_dir, name)
 
     def test_ndrdump_with_in(self):
-        self.check_run("ndrdump samr samr_CreateUser in %s" % (self.data_path("samr-CreateUser-in.dat")))
+        self.check_run(("ndrdump samr samr_CreateUser in %s" %
+                       (self.data_path("samr-CreateUser-in.dat"))))
 
     def test_ndrdump_with_out(self):
-        self.check_run("ndrdump samr samr_CreateUser out %s" % (self.data_path("samr-CreateUser-out.dat")))
+        self.check_run(("ndrdump samr samr_CreateUser out %s" %
+                       (self.data_path("samr-CreateUser-out.dat"))))
 
     def test_ndrdump_context_file(self):
-        self.check_run("ndrdump --context-file %s samr samr_CreateUser out %s" % (self.data_path("samr-CreateUser-in.dat"), self.data_path("samr-CreateUser-out.dat")))
+        self.check_run(
+            ("ndrdump --context-file %s samr samr_CreateUser out %s" %
+                (self.data_path("samr-CreateUser-in.dat"),
+                self.data_path("samr-CreateUser-out.dat"))))
 
     def test_ndrdump_with_validate(self):
-        self.check_run("ndrdump --validate samr samr_CreateUser in %s" % (self.data_path("samr-CreateUser-in.dat")))
+        self.check_run(("ndrdump --validate samr samr_CreateUser in %s" %
+                       (self.data_path("samr-CreateUser-in.dat"))))
 
     def test_ndrdump_with_hex_decode_function(self):
-        self.check_run("ndrdump dns decode_dns_name_packet in --hex-input %s" %
-                       self.data_path("dns-decode_dns_name_packet-hex.dat"))
+        self.check_run(
+            ("ndrdump dns decode_dns_name_packet in --hex-input %s" %
+                self.data_path("dns-decode_dns_name_packet-hex.dat")))
 
     def test_ndrdump_with_hex_struct_name(self):
         try: