From 955143ddfb3ea6f5f7b63902a734f17d393da4d8 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 23 Apr 2025 11:23:43 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/tests/test_tls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.39.5