l.b.t.externalbugtracker : module documentation

Part of lp.bugs.tests

Helper classes for testing ExternalSystem.
Function new_bugtracker Create a new bug tracker using the 'launchpad db user.
Function read_test_file Return the contents of the test file named :name:
Function print_bugwatches Print the bug watches for a BugTracker, ordered by remote bug id.
Function convert_python_status Convert a human readable status and resolution into a Python
Function set_bugwatch_error_type Set the last_error_type field of a bug watch to a given error type.
Class TestExternalBugTracker A test version of ExternalBugTracker.
Class TestBrokenExternalBugTracker A test version of ExternalBugTracker, designed to break.
Class TestBugzilla Bugzilla ExternalSystem for use in tests.
Class TestWeirdBugzilla Test support for a few corner cases in Bugzilla.
Class TestBrokenBugzilla Test parsing of a Bugzilla which returns broken XML.
Class AnotherBrokenBugzilla Test parsing of a Bugzilla which returns broken XML.
Class TestIssuezilla Test support for Issuezilla, with slightly modified XML.
Class TestOldBugzilla Test support for older Bugzilla versions.
Class FakeHTTPConnection A fake HTTP connection.
Class TestBugzillaXMLRPCTransport A test implementation of the Bugzilla XML-RPC interface.
Class TestBugzillaAPIXMLRPCTransport A test implementation of the Bugzilla 3.4 XML-RPC API.
Class NoAliasTestBugzillaAPIXMLRPCTransport A TestBugzillaAPIXMLRPCTransport that has no bug aliases.
Class TestMantis Mantis ExternalSystem for use in tests.
Class TestTrac Trac ExternalBugTracker for testing purposes.
Class MockTracRemoteBug A mockup of a remote Trac bug.
Class TestInternalXMLRPCTransport Test XML-RPC Transport for the internal XML-RPC server.
Function strip_trac_comment Tidy up a comment dict and return it as the Trac LP Plugin would.
Class TestTracXMLRPCTransport An XML-RPC transport to be used when testing Trac.
Class TestRoundup Roundup ExternalBugTracker for testing purposes.
Class TestRequestTracker A Test-oriented RequestTracker implementation.
Class TestSourceForge Test-oriented SourceForge ExternalBugTracker.
Class TestDebianBug A debbugs bug that doesn't require the debbugs db.
Class TestDebBugsDB A debbugs db object that doesn't require access to the debbugs db.
Class TestDebBugs A Test-oriented Debbugs ExternalBugTracker.
Class UrlLib2TransportTestInfo A url info object for use in the test, returning
Class UrlLib2TransportTestHandler A test urllib2 handler returning a hard-coded response.
Function ensure_response_parser_is_expat Ensure the transport always selects the Expat-based response parser.
def new_bugtracker(bugtracker_type, base_url='http://bugs.some.where'):
Create a new bug tracker using the 'launchpad db user.

Before calling this function, the current transaction should be commited, since the current connection to the database will be closed. After returning from this function, a new connection using the checkwatches db user is created.

def read_test_file(name):
Return the contents of the test file named :name:
def print_bugwatches(bug_watches, convert_remote_status=None):
Print the bug watches for a BugTracker, ordered by remote bug id.

Bug watches will be printed in the form: Remote bug <id>: <remote_status>. If convert_remote_status is callable it will be used to convert the watches' remote statuses to Launchpad BugTaskStatuses and these will be output instead.

Unknown Field: bug_watchesA set of BugWatches to print.
Unknown Field: convert_remote_statusA convertRemoteStatus method from an ExternalBugTracker instance, which will convert a bug's remote status into a Launchpad BugTaskStatus. See ExternalBugTracker.convertRemoteStatus().
def convert_python_status(status, resolution):
Convert a human readable status and resolution into a Python bugtracker status and resolution string.
def set_bugwatch_error_type(bug_watch, error_type):
Set the last_error_type field of a bug watch to a given error type.
def strip_trac_comment(comment):
Tidy up a comment dict and return it as the Trac LP Plugin would.
def ensure_response_parser_is_expat(transport):
Ensure the transport always selects the Expat-based response parser.

The response parser is chosen by xmlrpclib at runtime from a number of choices, but the main Launchpad production environment selects Expat at present.

Developer's machines could have other packages, python-reportlab-accel (which provides the sgmlop module) for example, that cause different response parsers to be chosen.

API Documentation for Launchpad, generated by pydoctor at 2018-05-27 00:00:04.