/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-06-30 23:11:39 UTC
  • mfrom: (6973.12.13 python3-k)
  • Revision ID: breezy.the.bot@gmail.com-20180630231139-tf5t5khh6bu5ntpm
Fix some more tests on python3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-k/+merge/348646

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for selection of the right Launchpad service by environment"""
18
18
 
19
19
import os
20
 
import xmlrpclib
 
20
try:
 
21
    from xmlrpc.client import Fault
 
22
except ImportError:  # python < 3
 
23
    from xmlrpclib import Fault
21
24
 
22
25
from ... import errors
23
26
from .lp_registration import (
157
160
        service = LaunchpadService()
158
161
        factory = FakeResolveFactory(self, 'foo', None)
159
162
        def submit(service):
160
 
            raise xmlrpclib.Fault(42, 'something went wrong')
 
163
            raise Fault(42, 'something went wrong')
161
164
        factory.submit = submit
162
165
        self.assertRaises(
163
166
            InvalidURL, service.get_web_url_from_branch_url, 'lp:foo',