From 087ec0f74328f04897f0710e26458e0b0c43762a Mon Sep 17 00:00:00 2001 From: "Kai A. Hiller" Date: Mon, 2 Dec 2024 15:40:48 +0100 Subject: [PATCH] test_secret_files_existing: Check bytes not str --- tests/config/test_load.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/config/test_load.py b/tests/config/test_load.py index f5d5ba441a1..1fc8723fae7 100644 --- a/tests/config/test_load.py +++ b/tests/config/test_load.py @@ -146,16 +146,16 @@ def test_secret_files_missing(self, config_str: str) -> None: [ ( "turn_shared_secret_path: {}", - lambda c: c.voip.turn_shared_secret, + lambda c: c.voip.turn_shared_secret.encode("utf-8"), ), ( "registration_shared_secret_path: {}", - lambda c: c.registration.registration_shared_secret, + lambda c: c.registration.registration_shared_secret.encode("utf-8"), ), *[ ( "redis:\n enabled: true\n password_path: {}", - lambda c: c.redis.redis_password, + lambda c: c.redis.redis_password.encode("utf-8"), ) ] * (hiredis is not None), @@ -171,4 +171,4 @@ def test_secret_files_existing( self.add_lines_to_config(["", config_line.format(secret_file.name)]) config = HomeServerConfig.load_config("", ["-c", self.config_file]) - self.assertEqual(get_secret(config), "53C237") + self.assertEqual(get_secret(config), b"53C237")