l.r.t.mailinglists_helper : module documentation

Part of lp.registry.tests

Helper functions for testing XML-RPC services.
Function fault_catcher Decorator for displaying Faults in a cross-compatible way.
Function new_team A helper function for the mailinglist doctests.
Function new_list_for_team A helper that creates a new, active mailing list for a team.
Class MailmanStub A stand-in for Mailman's XMLRPC client for page tests.
Class MailingListXMLRPCTestProxy A low impedance test proxy for code that uses MailingListAPIView.
def fault_catcher(func):
Decorator for displaying Faults in a cross-compatible way.

When running the same doctest with the ServerProxy, faults are turned into exceptions by the XMLRPC machinery, but with the direct view the faults are just returned. This causes an impedance mismatch with exception display in the doctest that cannot be papered over by using ellipses. So to make this work in a consistent way, a subclass of the view class is used which prints faults to match the output of ServerProxy (proper exceptions aren't really necessary).

def new_team(team_name, with_list=False):
A helper function for the mailinglist doctests.

This just provides a convenience function for creating the kinds of teams we need to use in the doctest.

def new_list_for_team(team):
A helper that creates a new, active mailing list for a team.

Used in doctests.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.