/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_directory.py

Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
        :seealso: http://pad.lv/843900
130
130
        """
131
131
        # This ought to be natty-updates.
132
 
        self.assertRaises(errors.InvalidURL,
 
132
        self.assertRaises(lp_registration.InvalidURL,
133
133
            self.assertResolve,
134
134
            '',
135
135
            'ubuntu:natty/updates/smartpm')
287
287
            self, 'apt', dict(urls=[
288
288
                    'bad-scheme://bazaar.launchpad.net/~apt/apt/devel']))
289
289
        directory = LaunchpadDirectory()
290
 
        self.assertRaises(errors.InvalidURL,
 
290
        self.assertRaises(lp_registration.InvalidURL,
291
291
                          directory._resolve, 'lp:///apt', factory)
292
292
 
293
293
    def test_directory_fault(self):
297
297
            raise xmlrpclib.Fault(42, 'something went wrong')
298
298
        factory.submit = submit
299
299
        directory = LaunchpadDirectory()
300
 
        self.assertRaises(errors.InvalidURL,
 
300
        self.assertRaises(lp_registration.InvalidURL,
301
301
                          directory._resolve, 'lp:///apt', factory)
302
302
 
303
303
    def test_skip_bzr_ssh_launchpad_net_when_anonymous(self):
350
350
    # TODO: check we get an error if the url is unreasonable
351
351
    def test_error_for_bad_url(self):
352
352
        directory = LaunchpadDirectory()
353
 
        self.assertRaises(errors.InvalidURL,
 
353
        self.assertRaises(lp_registration.InvalidURL,
354
354
            directory._resolve, 'lp://ratotehunoahu')
355
355
 
356
356
    def test_resolve_tilde_to_user(self):
373
373
                    'bzr+ssh://bazaar.launchpad.net/~username/apt/test']))
374
374
        self.assertIs(None, get_lp_login())
375
375
        directory = LaunchpadDirectory()
376
 
        self.assertRaises(errors.InvalidURL,
 
376
        self.assertRaises(lp_registration.InvalidURL,
377
377
                          directory._resolve, 'lp:~/apt/test', factory)
378
378
 
379
379
 
545
545
    # Bogus distro.
546
546
 
547
547
    def test_bogus_distro(self):
548
 
        self.assertRaises(errors.InvalidURL,
 
548
        self.assertRaises(lp_registration.InvalidURL,
549
549
                          self.directory._resolve, 'gentoo:foo')
550
550
 
551
551
    def test_trick_bogus_distro_u(self):
552
 
        self.assertRaises(errors.InvalidURL,
 
552
        self.assertRaises(lp_registration.InvalidURL,
553
553
                          self.directory._resolve, 'utube:foo')
554
554
 
555
555
    def test_trick_bogus_distro_d(self):
556
 
        self.assertRaises(errors.InvalidURL,
 
556
        self.assertRaises(lp_registration.InvalidURL,
557
557
                          self.directory._resolve, 'debuntu:foo')
558
558
 
559
559
    def test_missing_ubuntu_distroseries_without_project(self):