summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-06-05 15:13:03 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-06-05 15:13:03 +0100
commitc9573ca0691b15a93cec065804b0f6cc887e9301 (patch)
tree10f140334152186083bec94005fce025a87f05a2
parentone more time (diff)
downloadsynapse-c9573ca0691b15a93cec065804b0f6cc887e9301.tar.xz
Change template_dir to originate from synapse root dir
-rw-r--r--synapse/config/emailconfig.py2
-rw-r--r--tests/utils.py13
2 files changed, 8 insertions, 7 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py
index 38cdbd4aaa..82ff9f9360 100644
--- a/synapse/config/emailconfig.py
+++ b/synapse/config/emailconfig.py
@@ -64,7 +64,7 @@ class EmailConfig(Config):
         # work for the same reason.)
         if not template_dir:
             template_dir = pkg_resources.resource_filename(
-                'synapse', 'res/templates'
+                'synapse', '../res/templates'
             )
 
         self.email_template_dir = os.path.abspath(template_dir)
diff --git a/tests/utils.py b/tests/utils.py
index 8e65b1ab7a..be282c31b7 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -131,11 +131,12 @@ def default_config(name, parse=False):
         "password_providers": [],
         "worker_replication_url": "",
         "worker_app": None,
-        "email_enable_notifs": False,
-        "email_smtp_host": "somehost",
-        "email_smtp_port": 25,
-        "template_dir": "res/templates",
-        "email_notif_from": "someone <someone@example.com>",
+        "email": {
+            "enable_notifs": False,
+            "smtp_host": "somehost",
+            "smtp_port": 25,
+            "notif_from": "someone <someone@example.com>",
+        },
         "block_non_admin_invites": False,
         "federation_domain_whitelist": None,
         "filter_timeline_limit": 5000,
@@ -170,7 +171,7 @@ def default_config(name, parse=False):
             "failed_attempts": {"per_second": 10000, "burst_count": 10000},
         },
         "saml2_enabled": False,
-        "public_baseurl": None,
+        "public_baseurl": "http://localhost/",
         "default_identity_server": None,
         "key_refresh_interval": 24 * 60 * 60 * 1000,
         "old_signing_keys": {},