Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits:
3c0cbb5e by Дилян Палаузов at 2022-04-01T17:21:55+03:00
Simplify test_subscriptions.py:test_translated_subject_unsubscribe
- - - - -
a1db23b8 by Mark Sapiro at 2022-04-02T00:48:28+00:00
Merge branch 'simplify_test_translated_subject_unsubscribe' into
'master'
Simplify test_subscriptions.py:test_translated_subject_unsubscribe
See merge request mailman/mailman!1008
- - - - -
1 changed file:
- src/mailman/app/tests/test_subscriptions.py
Changes:
=====================================
src/mailman/app/tests/test_subscriptions.py
=====================================
@@ -22,7 +22,6 @@ import unittest
from contextlib import suppress
from datetime import datetime
-from email.header import decode_header
from lazr.config import as_timedelta
from mailman.app.lifecycle import create_list
from mailman.app.membership import delete_member
@@ -52,14 +51,6 @@ from unittest.mock import patch
from zope.component import getUtility
-def _decode_header(header):
- # convert an encoded header value to Python string
- decoded_string, charset = decode_header(header)[0]
- if charset is not None:
- return decoded_string.decode(charset)
- return decoded_string
-
-
class TestSubscriptionWorkflow(unittest.TestCase):
layer = ConfigLayer
maxDiff = None
@@ -937,5 +928,5 @@ approval:
delete_member(self._mlist, self._anne, False, True)
anne.preferences.preferred_language = old_code
items = get_queue_messages('virgin', expected_count=1)
- self.assertEqual(_decode_header(items[0].msg['Subject']), "Vous avez"
+ self.assertEqual(str(items[0].msg['Subject']), "Vous avez"
" été désabonné de la liste de diffusion Test")
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/b02d188fca31c5c0ddb9d679fa8dea9e6077c076...a1db23b82e8d9293672621a16d1ed0127b26dbe3
--
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/b02d188fca31c5c0ddb9d679fa8dea9e6077c076...a1db23b82e8d9293672621a16d1ed0127b26dbe3
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: [email protected]