summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_listconf.py
diff options
context:
space:
mode:
authorBarry Warsaw2017-05-24 13:25:26 -0700
committerBarry Warsaw2017-05-24 13:25:26 -0700
commitb2d961dcffa6602c2b39e421b157c0c0026b6c46 (patch)
treeb2a41632ee41f847d48b4c8155e8cc1bd1155893 /src/mailman/rest/tests/test_listconf.py
parent6894855b2b6c6fb7ada2dca3708f67a16cf2e2da (diff)
downloadmailman-b2d961dcffa6602c2b39e421b157c0c0026b6c46.tar.gz
mailman-b2d961dcffa6602c2b39e421b157c0c0026b6c46.tar.zst
mailman-b2d961dcffa6602c2b39e421b157c0c0026b6c46.zip
Fix the template name of the welcome message.
We did not previously complete the renaming of the templates. Rename: * user:ack:welcome -> list:user:notice:welcome * user:ack:goodbye -> list:user:notice:goodbye The new names are what are actually used in send_welcome_message() and send_goodbye_message() so the old names were actually never used. NOTE: If you added welcome or goodbye templates through REST from git head, the old names will not be used. Given that this wasn't a feature in 3.0, and the above use case is very unlikely, I've decided not to do a migration. If anybody is affected, the changes can be made manually in withlist. Closes: #337
Diffstat (limited to 'src/mailman/rest/tests/test_listconf.py')
-rw-r--r--src/mailman/rest/tests/test_listconf.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman/rest/tests/test_listconf.py b/src/mailman/rest/tests/test_listconf.py
index 06c138fee..782effd29 100644
--- a/src/mailman/rest/tests/test_listconf.py
+++ b/src/mailman/rest/tests/test_listconf.py
@@ -379,7 +379,7 @@ class TestConfiguration(unittest.TestCase):
def test_get_goodbye_message_uri(self):
with transaction():
getUtility(ITemplateManager).set(
- 'user:ack:goodbye', self._mlist.list_id,
+ 'list:user:notice:goodbye', self._mlist.list_id,
'mailman:///goodbye.txt')
resource, response = call_api(
'http://localhost:9001/3.0/lists/ant.example.com/config'
@@ -395,7 +395,7 @@ class TestConfiguration(unittest.TestCase):
self.assertEqual(response.status_code, 204)
self.assertEqual(
getUtility(ITemplateManager).raw(
- 'user:ack:goodbye', self._mlist.list_id).uri,
+ 'list:user:notice:goodbye', self._mlist.list_id).uri,
'mailman:///salutation.txt')
def test_patch_goodbye_message_uri(self):
@@ -407,14 +407,14 @@ class TestConfiguration(unittest.TestCase):
self.assertEqual(response.status_code, 204)
self.assertEqual(
getUtility(ITemplateManager).raw(
- 'user:ack:goodbye', self._mlist.list_id).uri,
+ 'list:user:notice:goodbye', self._mlist.list_id).uri,
'mailman:///salutation.txt')
def test_put_goodbye_message_uri(self):
manager = getUtility(ITemplateManager)
with transaction():
manager.set(
- 'user:ack:goodbye',
+ 'list:user:notice:goodbye',
self._mlist.list_id,
'mailman:///somefile.txt')
resource, response = call_api(
@@ -424,7 +424,7 @@ class TestConfiguration(unittest.TestCase):
'PUT')
self.assertEqual(response.status_code, 204)
self.assertEqual(
- manager.raw('user:ack:goodbye', self._mlist.list_id).uri,
+ manager.raw('list:user:notice:goodbye', self._mlist.list_id).uri,
'mailman:///salutation.txt')
def test_advertised(self):