From 7680010e3bc7405e7350d7375cf02d61abd30849 Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Wed, 5 Jun 2019 10:34:17 +1200 Subject: [PATCH] tests blackbox ndrdump: Clean up pep8 warnings Clean up the test code and remove the pep8 warnings Signed-off-by: Gary Lockyer Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Thu Jun 6 04:58:18 UTC 2019 on sn-devel-184 --- python/samba/tests/blackbox/ndrdump.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/python/samba/tests/blackbox/ndrdump.py b/python/samba/tests/blackbox/ndrdump.py index 7ca7b93f559..fd1bc832d9b 100644 --- a/python/samba/tests/blackbox/ndrdump.py +++ b/python/samba/tests/blackbox/ndrdump.py @@ -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: -- 2.47.3