summaryrefslogtreecommitdiff
path: root/Mailman/tests/test_documentation.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-11-06 18:16:22 -0500
committerBarry Warsaw2007-11-06 18:16:22 -0500
commitd6377c92857c513faf484ef9a91a6b00da789d4b (patch)
treec00600e52ec7ad327c947bc9a756e2694478a4d6 /Mailman/tests/test_documentation.py
parent46f480dfaa6286ff8950af817de1c35910b37e16 (diff)
downloadmailman-d6377c92857c513faf484ef9a91a6b00da789d4b.tar.gz
mailman-d6377c92857c513faf484ef9a91a6b00da789d4b.tar.zst
mailman-d6377c92857c513faf484ef9a91a6b00da789d4b.zip
Fix two doctests: ack-headers and acknowledgment.
This hacks around an apparent bug in the email package where if you parse a unicode message string, you still end up getting 8-bit strings out of the headers, and probably payloads. The hack is to override Mailman.Message.Message.__getitem__() to force the header value returned to a Unicode. It must be ASCII but this is required anyway by RFC 2822. It's not perfect, but it lets us get farther without forcing a detour into fixing the email package. Other changes: - Fix the Address table's references, and also update the subscribe() query. - Fix the Member table's references and add a __init__(). - Fix Roster's get_member() query. - Fix the Enum class's variable_class attribute. - UserManager.create_user() has to use Unicodes for real_name.
Diffstat (limited to 'Mailman/tests/test_documentation.py')
-rw-r--r--Mailman/tests/test_documentation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/tests/test_documentation.py b/Mailman/tests/test_documentation.py
index c6ba0a1d6..9de74e109 100644
--- a/Mailman/tests/test_documentation.py
+++ b/Mailman/tests/test_documentation.py
@@ -36,8 +36,8 @@ COMMASPACE = ', '
-def specialized_message_from_string(string):
- return message_from_string(string, Message)
+def specialized_message_from_string(text):
+ return message_from_string(text, Message)
def setup(testobj):