Skip to content

Commit

Permalink
test_secret_files_existing: Check bytes not str
Browse files Browse the repository at this point in the history
  • Loading branch information
V02460 committed Dec 2, 2024
1 parent 9367d18 commit 087ec0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/config/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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")

0 comments on commit 087ec0f

Please sign in to comment.