~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
The BranchPuller application
============================

The codehosting application is an XMLRPC service that allows the
codehosting service and puller to find and update the status of
branches.  It is available as the codehosting attribute of our private
XMLRPC instance.

    >>> from lp.xmlrpc.interfaces import IPrivateApplication
    >>> from lp.code.interfaces.codehosting import (
    ...     ICodehostingApplication)
    >>> from lp.services.webapp.testing import verifyObject

    >>> private_root = getUtility(IPrivateApplication)
    >>> verifyObject(
    ...     ICodehostingApplication,
    ...     private_root.codehosting)
    True

The CodehostingAPI view provides the ICodehostingAPI XML-RPC API:

    >>> from lp.services.webapp.servers import LaunchpadTestRequest
    >>> from lp.code.interfaces.codehosting import ICodehostingAPI
    >>> from lp.code.xmlrpc.codehosting import CodehostingAPI

    >>> codehosting_api = CodehostingAPI(
    ...     private_root.codehosting, LaunchpadTestRequest())
    >>> verifyObject(ICodehostingAPI, codehosting_api)
    True

The ICodehostingAPI interface defines some methods, for which see the
unit tests.