diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2021-04-06 13:48:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 13:48:22 +0100 |
commit | 024f121b744661f96d771393ddc469dbc322a1c5 (patch) | |
tree | 467d79c653a16741a5a8f2c0f6099ee45559817b /tests/config | |
parent | Remove outdated constraint on remote_media_cache_thumbnails (#9725) (diff) | |
download | synapse-024f121b744661f96d771393ddc469dbc322a1c5.tar.xz |
Fix reported bugbear: too broad exception assertion (#9753)
Diffstat (limited to 'tests/config')
-rw-r--r-- | tests/config/test_load.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/config/test_load.py b/tests/config/test_load.py index 734a9983e8..c109425671 100644 --- a/tests/config/test_load.py +++ b/tests/config/test_load.py @@ -20,6 +20,7 @@ from io import StringIO import yaml +from synapse.config import ConfigError from synapse.config.homeserver import HomeServerConfig from tests import unittest @@ -35,9 +36,9 @@ class ConfigLoadingTestCase(unittest.TestCase): def test_load_fails_if_server_name_missing(self): self.generate_config_and_remove_lines_containing("server_name") - with self.assertRaises(Exception): + with self.assertRaises(ConfigError): HomeServerConfig.load_config("", ["-c", self.file]) - with self.assertRaises(Exception): + with self.assertRaises(ConfigError): HomeServerConfig.load_or_generate_config("", ["-c", self.file]) def test_generates_and_loads_macaroon_secret_key(self): |