~james-w/bzr-pqm/fix-service-roots

« back to all changes in this revision

Viewing changes to test_lpland.py

  • Committer: James Westby
  • Date: 2010-03-31 14:41:33 UTC
  • Revision ID: james.westby@canonical.com-20100331144133-7e6f9u3rj220j3xi
Use the launchpad declarations of the service roots.

The hardcoded values were now incorrect since the multi-version change.

The definitions in launchpadlib.uris have been around long enough that
everyone should have them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
import unittest
9
9
 
10
 
from launchpadlib.launchpad import EDGE_SERVICE_ROOT, STAGING_SERVICE_ROOT
 
10
from launchpadlib.uris import (
 
11
    DEV_SERVICE_ROOT, EDGE_SERVICE_ROOT, LPNET_SERVICE_ROOT,
 
12
    STAGING_SERVICE_ROOT)
11
13
 
12
14
from bzrlib.plugins.pqm.lpland import (
13
15
    get_bazaar_host, get_bugs_clause, get_reviewer_clause,
169
171
    def test_dev_service(self):
170
172
        # The Bazaar host for the dev service is bazaar.launchpad.dev.
171
173
        self.assertEqual(
172
 
            'bazaar.launchpad.dev',
173
 
            get_bazaar_host('https://api.launchpad.dev/beta/'))
 
174
            'bazaar.launchpad.dev', get_bazaar_host(DEV_SERVICE_ROOT))
174
175
 
175
176
    def test_edge_service(self):
176
177
        # The Bazaar host for the edge service is bazaar.launchpad.net, since
181
182
    def test_production_service(self):
182
183
        # The Bazaar host for the production service is bazaar.launchpad.net.
183
184
        self.assertEqual(
184
 
            'bazaar.launchpad.net',
185
 
            get_bazaar_host('https://api.launchpad.net/beta/'))
 
185
            'bazaar.launchpad.net', get_bazaar_host(LPNET_SERVICE_ROOT))
186
186
 
187
187
    def test_staging_service(self):
188
188
        # The Bazaar host for the staging service is