Part of lp.testing
|Function||pop_notifications||Return generated emails as email messages.|
|Function||sort_addresses||Sort an address-list in an email header field body.|
|Function||print_emails||Pop all messages from stub.test_emails and print them with|
|Function||print_distinct_emails||A convenient shortcut for `print_emails`(group_similar=True).|
|Function||run_mail_jobs||Process job queues that send out emails.|
Return generated emails as email messages. A helper function which optionally commits the transaction, so that the notifications are queued in stub.test_emails and pops these notifications from the queue. :param sort_key: define sorting function. sort_key specifies a function of one argument that is used to extract a comparison key from each list element. (See the sorted() Python built-in.) :param commit: whether to commit before reading email (defaults to True).
Since the same message may be sent more than once (for different recipients), setting 'group_similar' will print each distinct message only once and group all recipients of that message together in the 'To:' field. It will also strip the first line of the email body. (The line with "Hello Foo," which is likely distinct for each recipient.)
|Parameters||include_reply_to||Include the reply-to header if True.|
|group_similar||Group messages sent to multiple recipients if True.|
|include_rationale||Include the X-Launchpad-Message-Rationale header.|
|include_for||Include the X-Launchpad-Message-For header.|
|notifications||Use the provided list of notifications instead of the stack.|
|include_notification_type||Include the X-Launchpad-Notification-Type header.|
|decode||Decode message payloads if True.|
A convenient shortcut for `print_emails`(group_similar=True).