]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: pass bytes.decode() instead of str(bytes) to assertMultiLineEqual(...
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Jul 2024 18:14:46 +0000 (20:14 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 16 Jul 2024 07:40:41 +0000 (07:40 +0000)
When not equal a diff of the two strings highlighting the differences
will be included this way.

This is a flapping test.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jul 16 07:40:41 UTC 2024 on atb-devel-224

python/samba/tests/dckeytab.py

index edb8a079da0fd367e07a01c9c2dbc0b2c2964b58..9dee64e0ceab09cbd9710cfe263273d82496f54c 100644 (file)
@@ -174,7 +174,8 @@ class DCKeytabTests(TestCaseInTempDir):
         ).communicate()[0]
 
         self.maxDiff = None  # No maximum length of diffs.
-        self.assertMultiLineEqual(str(keytab_orig_content), str(keytab_content))
+        self.assertMultiLineEqual(keytab_orig_content.decode(),
+                                  keytab_content.decode())
 
         # Parse the first entry in the keytab
         with open(self.ktfile, 'rb') as bytes_kt: