summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw2017-05-24 13:25:26 -0700
committerBarry Warsaw2017-05-24 13:25:26 -0700
commitb2d961dcffa6602c2b39e421b157c0c0026b6c46 (patch)
treeb2a41632ee41f847d48b4c8155e8cc1bd1155893
parent6894855b2b6c6fb7ada2dca3708f67a16cf2e2da (diff)
downloadmailman-b2d961dcffa6602c2b39e421b157c0c0026b6c46.tar.gz
mailman-b2d961dcffa6602c2b39e421b157c0c0026b6c46.tar.zst
mailman-b2d961dcffa6602c2b39e421b157c0c0026b6c46.zip
-rw-r--r--src/mailman/app/tests/test_notifications.py5
-rw-r--r--src/mailman/database/alembic/versions/fa0d96e28631_template_manager.py4
-rw-r--r--src/mailman/database/tests/test_migrations.py12
-rw-r--r--src/mailman/rest/listconf.py4
-rw-r--r--src/mailman/rest/tests/test_listconf.py10
5 files changed, 18 insertions, 17 deletions
diff --git a/src/mailman/app/tests/test_notifications.py b/src/mailman/app/tests/test_notifications.py
index 05ce4cf2f..4a6f56a72 100644
--- a/src/mailman/app/tests/test_notifications.py
+++ b/src/mailman/app/tests/test_notifications.py
@@ -48,7 +48,8 @@ class TestNotifications(unittest.TestCase):
self._mlist = create_list('test@example.com')
self._mlist.display_name = 'Test List'
getUtility(ITemplateManager).set(
- 'user:ack:welcome', self._mlist.list_id, 'mailman:///welcome.txt')
+ 'list:user:notice:welcome', self._mlist.list_id,
+ 'mailman:///welcome.txt')
config.push('template config', """\
[paths.testing]
template_dir: {}/templates
@@ -94,7 +95,7 @@ Welcome to the Test List mailing list.
# The welcome message url can contain placeholders for the fqdn list
# name and language.
getUtility(ITemplateManager).set(
- 'user:ack:welcome', self._mlist.list_id,
+ 'list:user:notice:welcome', self._mlist.list_id,
'mailman:///$listname/$language/welcome.txt')
# Add the xx language and subscribe Anne using it.
manager = getUtility(ILanguageManager)
diff --git a/src/mailman/database/alembic/versions/fa0d96e28631_template_manager.py b/src/mailman/database/alembic/versions/fa0d96e28631_template_manager.py
index 8fb8c1056..4e8fc39c6 100644
--- a/src/mailman/database/alembic/versions/fa0d96e28631_template_manager.py
+++ b/src/mailman/database/alembic/versions/fa0d96e28631_template_manager.py
@@ -24,9 +24,9 @@ CONVERSION_MAPPING = dict(
digest_footer_uri='list:digest:footer',
digest_header_uri='list:digest:header',
footer_uri='list:regular:footer',
- goodbye_message_uri='user:ack:goodbye',
+ goodbye_message_uri='list:user:notice:goodbye',
header_uri='list:regular:header',
- welcome_message_uri='user:ack:welcome',
+ welcome_message_uri='list:user:notice:welcome',
)
REVERSE_MAPPING = {value: key for key, value in CONVERSION_MAPPING.items()}
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py
index cba5dbbd5..b5d17d6db 100644
--- a/src/mailman/database/tests/test_migrations.py
+++ b/src/mailman/database/tests/test_migrations.py
@@ -374,16 +374,16 @@ class TestMigrations(unittest.TestCase):
'list:digest:header': 'digest_header',
'list:regular:footer': 'footer',
'list:regular:header': 'header',
- 'user:ack:goodbye': 'goodbye',
- 'user:ack:welcome': 'welcome',
+ 'list:user:notice:goodbye': 'goodbye',
+ 'list:user:notice:welcome': 'welcome',
}.get(name, name)))
self.assertEqual(sorted(seen_names), [
'list:digest:footer',
'list:digest:header',
'list:regular:footer',
'list:regular:header',
- 'user:ack:goodbye',
- 'user:ack:welcome',
+ 'list:user:notice:goodbye',
+ 'list:user:notice:welcome',
])
def test_fa0d96e28631_upgrade_no_uris(self):
@@ -435,10 +435,10 @@ class TestMigrations(unittest.TestCase):
manager.set('list:regular:header',
'ant.example.com',
'mailman:///header.txt')
- manager.set('user:ack:welcome',
+ manager.set('list:user:notice:welcome',
'ant.example.com',
'mailman:///welcome.txt')
- manager.set('user:ack:goodbye',
+ manager.set('list:user:notice:goodbye',
'ant.example.com',
'mailman:///goodbye.txt')
mlist_table = sa.sql.table(
diff --git a/src/mailman/rest/listconf.py b/src/mailman/rest/listconf.py
index 87535ce48..da7111d0f 100644
--- a/src/mailman/rest/listconf.py
+++ b/src/mailman/rest/listconf.py
@@ -65,9 +65,9 @@ TEMPLATE_ATTRIBUTES = dict(
digest_footer_uri='list:digest:footer',
digest_header_uri='list:digest:header',
footer_uri='list:regular:footer',
- goodbye_message_uri='user:ack:goodbye',
+ goodbye_message_uri='list:user:notice:goodbye',
header_uri='list:regular:header',
- welcome_message_uri='user:ack:welcome',
+ welcome_message_uri='list:user:notice:welcome',
)
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):