diff options
Diffstat (limited to 'src/mailman/tests/test_documentation.py')
| -rw-r--r-- | src/mailman/tests/test_documentation.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index 48b71d72c..0409e737c 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -69,16 +69,19 @@ class chdir: -def specialized_message_from_string(text): +def specialized_message_from_string(unicode_text): """Parse text into a message object. This is specialized in the sense that an instance of Mailman's own Message object is returned, and this message object has an attribute `original_size` which is the pre-calculated size in bytes of the message's text representation. + + Also, the text must be ASCII-only unicode. """ # This mimic what Switchboard.dequeue() does when parsing a message from # text into a Message instance. + text = unicode_text.encode('ascii') original_size = len(text) message = message_from_string(text, Message) message.original_size = original_size |
