summaryrefslogtreecommitdiff
path: root/src/mailman/database
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/database
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/database')
-rw-r--r--src/mailman/database/alembic/versions/fa0d96e28631_template_manager.py4
-rw-r--r--src/mailman/database/tests/test_migrations.py12
2 files changed, 8 insertions, 8 deletions
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(