/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/plugins/launchpad/test_lp_service.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import xmlrpclib
21
21
 
22
 
from bzrlib import errors
23
 
from bzrlib.plugins.launchpad.lp_registration import (
 
22
from ... import errors
 
23
from .lp_registration import (
24
24
    InvalidLaunchpadInstance, LaunchpadService, NotLaunchpadBranch)
25
 
from bzrlib.plugins.launchpad.test_lp_directory import FakeResolveFactory
26
 
from bzrlib.tests import TestCase
 
25
from .test_lp_directory import FakeResolveFactory
 
26
from ...tests import TestCase
27
27
 
28
28
 
29
29
class LaunchpadServiceTests(TestCase):
32
32
    def setUp(self):
33
33
        super(LaunchpadServiceTests, self).setUp()
34
34
        # make sure we have a reproducible standard environment
35
 
        self.overrideEnv('BZR_LP_XMLRPC_URL', None)
 
35
        self.overrideEnv('BRZ_LP_XMLRPC_URL', None)
36
36
 
37
37
    def test_default_service(self):
38
38
        service = LaunchpadService()
72
72
                         str(error))
73
73
 
74
74
    def test_environment_overrides_default(self):
75
 
        os.environ['BZR_LP_XMLRPC_URL'] = 'http://example.com/'
 
75
        os.environ['BRZ_LP_XMLRPC_URL'] = 'http://example.com/'
76
76
        service = LaunchpadService()
77
77
        self.assertEqual('http://example.com/',
78
78
                         service.service_url)
79
79
 
80
80
    def test_environment_overrides_specified_service(self):
81
 
        os.environ['BZR_LP_XMLRPC_URL'] = 'http://example.com/'
 
81
        os.environ['BRZ_LP_XMLRPC_URL'] = 'http://example.com/'
82
82
        service = LaunchpadService(lp_instance='staging')
83
83
        self.assertEqual('http://example.com/',
84
84
                         service.service_url)