diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-05-13 15:01:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 15:01:14 -0500 |
commit | df2ebd75d3abde2bc2262551d8b2fd40c4b4bddf (patch) | |
tree | 398ff6183b805dd419951052296e45036b22da50 /tests/push | |
parent | Add ability to blacklist ip ranges for federation traffic (#5043) (diff) | |
download | synapse-df2ebd75d3abde2bc2262551d8b2fd40c4b4bddf.tar.xz |
Migrate all tests to use the dict-based config format instead of hanging items off HomeserverConfig (#5171)
Diffstat (limited to 'tests/push')
-rw-r--r-- | tests/push/test_email.py | 36 | ||||
-rw-r--r-- | tests/push/test_http.py | 2 |
2 files changed, 21 insertions, 17 deletions
diff --git a/tests/push/test_email.py b/tests/push/test_email.py index 325ea449ae..9cdde1a9bd 100644 --- a/tests/push/test_email.py +++ b/tests/push/test_email.py @@ -52,22 +52,26 @@ class EmailPusherTests(HomeserverTestCase): return d config = self.default_config() - config.email_enable_notifs = True - config.start_pushers = True - - config.email_template_dir = os.path.abspath( - pkg_resources.resource_filename('synapse', 'res/templates') - ) - config.email_notif_template_html = "notif_mail.html" - config.email_notif_template_text = "notif_mail.txt" - config.email_smtp_host = "127.0.0.1" - config.email_smtp_port = 20 - config.require_transport_security = False - config.email_smtp_user = None - config.email_smtp_pass = None - config.email_app_name = "Matrix" - config.email_notif_from = "test@example.com" - config.email_riot_base_url = None + config["email"] = { + "enable_notifs": True, + "template_dir": os.path.abspath( + pkg_resources.resource_filename('synapse', 'res/templates') + ), + "expiry_template_html": "notice_expiry.html", + "expiry_template_text": "notice_expiry.txt", + "notif_template_html": "notif_mail.html", + "notif_template_text": "notif_mail.txt", + "smtp_host": "127.0.0.1", + "smtp_port": 20, + "require_transport_security": False, + "smtp_user": None, + "smtp_pass": None, + "app_name": "Matrix", + "notif_from": "test@example.com", + "riot_base_url": None, + } + config["public_baseurl"] = "aaa" + config["start_pushers"] = True hs = self.setup_test_homeserver(config=config, sendmail=sendmail) diff --git a/tests/push/test_http.py b/tests/push/test_http.py index 13bd2c8688..aba618b2be 100644 --- a/tests/push/test_http.py +++ b/tests/push/test_http.py @@ -54,7 +54,7 @@ class HTTPPusherTests(HomeserverTestCase): m.post_json_get_json = post_json_get_json config = self.default_config() - config.start_pushers = True + config["start_pushers"] = True hs = self.setup_test_homeserver(config=config, simple_http_client=m) |