diff options
Diffstat (limited to 'Mailman/tests/test_documentation.py')
| -rw-r--r-- | Mailman/tests/test_documentation.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Mailman/tests/test_documentation.py b/Mailman/tests/test_documentation.py index 390ba6a66..36b3c7ecb 100644 --- a/Mailman/tests/test_documentation.py +++ b/Mailman/tests/test_documentation.py @@ -36,7 +36,19 @@ COMMASPACE = ', ' def specialized_message_from_string(text): - return message_from_string(text, Message) + """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. + """ + # This mimic what Switchboard.dequeue() does when parsing a message from + # text into a Message instance. + original_size = len(text) + message = message_from_string(text, Message) + message.original_size = original_size + return message def setup(testobj): |
