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-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=955143ddfb3ea6f5f7b63902a734f17d393da4d8;p=ceph.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 --- diff --git a/src/pybind/mgr/tests/test_tls.py b/src/pybind/mgr/tests/test_tls.py index 840869514f1bf..bf006919e0c44 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):