mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 10:53:31 +00:00
Use yaml safe_load
This commit is contained in:
1 parent
01e6b405be
commit
3677548a82
7 files changed
+11
-11
No files matched your search
@@ -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])
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user