From: John Mulligan Date: Wed, 23 Apr 2025 15:23:43 +0000 (-0400) Subject: pybind/mgr: fix test case in test_tls.py X-Git-Tag: testing/wip-jcollin-testing-20260212.143545-tentacle~80^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcc7827146be3d3be2397efb599f61a69c783a61;p=ceph-ci.git pybind/mgr: fix test case in test_tls.py Why violate the typing in a test? mypy never noticed this because tests are not type checked but there seems to be no need to turn a str into bytes to pass to a function that is typed only as taking str! Signed-off-by: John Mulligan (cherry picked from commit 955143ddfb3ea6f5f7b63902a734f17d393da4d8) --- diff --git a/src/pybind/mgr/tests/test_tls.py b/src/pybind/mgr/tests/test_tls.py index 840869514f1..bf006919e0c 100644 --- a/src/pybind/mgr/tests/test_tls.py +++ b/src/pybind/mgr/tests/test_tls.py @@ -31,7 +31,7 @@ class TLSchecks(unittest.TestCase): crt, key = create_self_signed_cert() # fudge the key, to force an error to be detected during verify_tls - fudged = f"{key[:-35]}c0ffee==\n{key[-25:]}".encode('utf-8') + fudged = f"{key[:-35]}c0ffee==\n{key[-25:]}" self.assertRaises(ServerConfigException, verify_tls, crt, fudged) def test_mismatched_tls(self):