~ursinha/lp-qa-tools/bzr-tarmacland

« back to all changes in this revision

Viewing changes to tests/test_lpland.py

  • Committer: Jelmer Vernooij
  • Date: 2010-08-16 10:32:06 UTC
  • mfrom: (71.1.1 remove-bazaar-host)
  • Revision ID: jelmer@samba.org-20100816103206-h6zk1nmnsvon5rjw
[r=mbp] Remove obsolete get_bazaar_host() function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    STAGING_SERVICE_ROOT)
13
13
 
14
14
from bzrlib.plugins.pqm.lpland import (
15
 
    get_bazaar_host, get_bugs_clause, get_reviewer_clause,
 
15
    get_bugs_clause, get_reviewer_clause,
16
16
    get_reviewer_handle, get_testfix_clause, get_qa_clause,
17
17
    MissingReviewError, MissingBugsError, MissingBugsIncrementalError, 
18
18
    MergeProposal)
320
320
        # If the merge proposal hasn't been approved by anyone, we cannot
321
321
        # generate a valid clause.
322
322
        self.assertRaises(MissingReviewError, self.get_reviewer_clause, {})
323
 
 
324
 
 
325
 
class TestGetBazaarHost(unittest.TestCase):
326
 
    """Tests for `get_bazaar_host`."""
327
 
 
328
 
    def test_dev_service(self):
329
 
        # The Bazaar host for the dev service is bazaar.launchpad.dev.
330
 
        self.assertEqual(
331
 
            'bazaar.launchpad.dev', get_bazaar_host(DEV_SERVICE_ROOT))
332
 
 
333
 
    def test_edge_service(self):
334
 
        # The Bazaar host for the edge service is bazaar.launchpad.net, since
335
 
        # there's no edge codehosting service.
336
 
        self.assertEqual(
337
 
            'bazaar.launchpad.net', get_bazaar_host(EDGE_SERVICE_ROOT))
338
 
 
339
 
    def test_production_service(self):
340
 
        # The Bazaar host for the production service is bazaar.launchpad.net.
341
 
        self.assertEqual(
342
 
            'bazaar.launchpad.net', get_bazaar_host(LPNET_SERVICE_ROOT))
343
 
 
344
 
    def test_staging_service(self):
345
 
        # The Bazaar host for the staging service is
346
 
        # bazaar.staging.launchpad.net.
347
 
        self.assertEqual(
348
 
            'bazaar.staging.launchpad.net',
349
 
            get_bazaar_host(STAGING_SERVICE_ROOT))
350
 
 
351
 
    def test_unrecognized_service(self):
352
 
        # Any unrecognized URL will raise a ValueError.
353
 
        self.assertRaises(
354
 
            ValueError, get_bazaar_host, 'https://api.lunchpad.net')