l.c.x.t.t.LaunchpadDatabaseFrontend : class documentation

Part of lp.code.xmlrpc.tests.test_codehosting View In Hierarchy

A 'frontend' to Launchpad's branch services.

A 'frontend' here means something that provides access to the various XML-RPC endpoints, object factories and 'database' methods needed to write unit tests for XML-RPC endpoints.

All of these methods are gathered together in this class so that alternative implementations can be provided, see InMemoryFrontend.

Method getCodehostingEndpoint Return the branch filesystem endpoint for testing.
Method getLaunchpadObjectFactory Return the Launchpad object factory for testing.
Method getBranchLookup Return an implementation of IBranchLookup.
Method getLastActivity Get the last script activity with 'activity_name'.
def getCodehostingEndpoint(self):
Return the branch filesystem endpoint for testing.
def getLaunchpadObjectFactory(self):
Return the Launchpad object factory for testing.

See LaunchpadObjectFactory.

def getBranchLookup(self):
Return an implementation of IBranchLookup.

Tests should use this to get the branch set they need, rather than using 'getUtility(IBranchSet)'. This allows in-memory implementations to work correctly.

def getLastActivity(self, activity_name):
Get the last script activity with 'activity_name'.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.