~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/buildmaster/tests/test_webservice.py

  • Committer: Francis J. Lacoste
  • Date: 2011-07-07 20:58:11 UTC
  • mto: This revision was merged to the branch mainline in revision 13501.
  • Revision ID: francis.lacoste@canonical.com-20110707205811-uyhrll6nxbytowpo
Export IBuilder.processor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
from canonical.testing.layers import DatabaseFunctionalLayer
9
9
from canonical.launchpad.testing.pages import LaunchpadWebServiceCaller
10
10
from lp.testing import (
 
11
    api_url,
11
12
    logout,
12
13
    TestCaseWithFactory,
13
14
    )
29
30
            ['nonvirt', 'virt'], sorted(results.jsonBody().keys()))
30
31
 
31
32
 
 
33
class TestBuilderEntry(TestCaseWithFactory):
 
34
    layer = DatabaseFunctionalLayer
 
35
 
 
36
    def setUp(self):
 
37
        super(TestBuilderEntry, self).setUp()
 
38
        self.webservice = LaunchpadWebServiceCaller()
 
39
 
 
40
    def test_exports_processor(self):
 
41
        processor_family = self.factory.makeProcessorFamily(
 
42
            'supersecret', default_processor_name='s1')
 
43
        builder = self.factory.makeBuilder(
 
44
            processor=processor_family.processors[0])
 
45
 
 
46
        logout()
 
47
        entry = self.webservice.get(
 
48
            api_url(builder), api_version='devel').jsonBody()
 
49
        self.assertEndsWith(
 
50
            entry['processor_link'],
 
51
            '/+processor-families/supersecret/s1')