~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/test_lp_indirect.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-16 10:03:17 UTC
  • mfrom: (3224 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3230.
  • Revision ID: bialix@ukr.net-20080216100317-xg1hdw306evlgt94
merge bzr.dev; update for 1.3; $BZR_LOG used in trace.py module (again), not in the main bzr script (req. by Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        return self
41
41
 
42
42
    def submit(self, service):
 
43
        self._service_url = service.service_url
43
44
        return self._result
44
45
 
45
46
 
54
55
        transport = LaunchpadTransport('lp:///')
55
56
        self.assertEquals('http://bazaar.launchpad.net/~apt/apt/devel',
56
57
                          transport._resolve('lp:apt', factory))
 
58
        # Make sure that resolve went to the production server.
 
59
        self.assertEquals('https://xmlrpc.launchpad.net/bazaar/',
 
60
                          factory._service_url)
 
61
 
 
62
    def test_staging(self):
 
63
        """A launchpad url should map to a http url"""
 
64
        factory = FakeResolveFactory(
 
65
            self, 'apt', dict(urls=[
 
66
                    'http://bazaar.staging.launchpad.net/~apt/apt/devel']))
 
67
        url = 'lp://staging/apt'
 
68
        transport = LaunchpadTransport(url)
 
69
        self.assertEquals('http://bazaar.staging.launchpad.net/~apt/apt/devel',
 
70
                          transport._resolve(url, factory))
 
71
        # Make sure that resolve went to the staging server.
 
72
        self.assertEquals('https://xmlrpc.staging.launchpad.net/bazaar/',
 
73
                          factory._service_url)
57
74
 
58
75
    def test_indirect_through_url(self):
59
76
        """A launchpad url should map to a http url"""