diff options
author | Erik Johnston <erikj@jki.re> | 2019-03-22 11:58:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-22 11:58:13 +0000 |
commit | 5fee9d8067b0078d13ec99b08f1a2ff471478f38 (patch) | |
tree | 1d2778edecc564dd5cfad09adb03cd236d6de4e3 /tests/config | |
parent | Allow newsfragments to end with exclamation marks! (#4912) (diff) | |
parent | Newsfile (diff) | |
download | synapse-5fee9d8067b0078d13ec99b08f1a2ff471478f38.tar.xz |
Merge pull request #4869 from matrix-org/erikj/yaml_load
Fix yaml warnings by using safe_load
Diffstat (limited to 'tests/config')
-rw-r--r-- | tests/config/test_load.py | 2 | ||||
-rw-r--r-- | tests/config/test_room_directory.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/config/test_load.py b/tests/config/test_load.py index d5f1777093..6bfc1970ad 100644 --- a/tests/config/test_load.py +++ b/tests/config/test_load.py @@ -43,7 +43,7 @@ class ConfigLoadingTestCase(unittest.TestCase): self.generate_config() with open(self.file, "r") as f: - raw = yaml.load(f) + raw = yaml.safe_load(f) self.assertIn("macaroon_secret_key", raw) config = HomeServerConfig.load_config("", ["-c", self.file]) diff --git a/tests/config/test_room_directory.py b/tests/config/test_room_directory.py index 3dc2631523..47fffcfeb2 100644 --- a/tests/config/test_room_directory.py +++ b/tests/config/test_room_directory.py @@ -22,7 +22,7 @@ from tests import unittest class RoomDirectoryConfigTestCase(unittest.TestCase): def test_alias_creation_acl(self): - config = yaml.load(""" + config = yaml.safe_load(""" alias_creation_rules: - user_id: "*bob*" alias: "*" @@ -74,7 +74,7 @@ class RoomDirectoryConfigTestCase(unittest.TestCase): )) def test_room_publish_acl(self): - config = yaml.load(""" + config = yaml.safe_load(""" alias_creation_rules: [] room_list_publication_rules: |