/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/tests/test_errors.py

Move bugtracker errors to breezy.bugtracker.

Merged from https://code.launchpad.net/~jelmer/brz/move-errors-bugtracker/+merge/327167

Show diffs side-by-side

added added

removed removed

Lines of Context:
413
413
            "location specified in the merge directive is not a branch: "
414
414
            "foo.", str(error))
415
415
 
416
 
    def test_malformed_bug_identifier(self):
417
 
        """Test the formatting of MalformedBugIdentifier."""
418
 
        error = errors.MalformedBugIdentifier('bogus', 'reason for bogosity')
419
 
        self.assertEqual(
420
 
            'Did not understand bug identifier bogus: reason for bogosity. '
421
 
            'See "brz help bugs" for more information on this feature.',
422
 
            str(error))
423
 
 
424
416
    def test_unexpected_smart_server_response(self):
425
417
        e = errors.UnexpectedSmartServerResponse(('not yes',))
426
418
        self.assertEqual(
510
502
            "Invalid URL join request: Reason: 'base path' + ('args',)",
511
503
            str(e))
512
504
 
513
 
    def test_incorrect_url(self):
514
 
        err = errors.InvalidBugTrackerURL('foo', 'http://bug.com/')
515
 
        self.assertEqual(
516
 
            ("The URL for bug tracker \"foo\" doesn't contain {id}: "
517
 
             "http://bug.com/"),
518
 
            str(err))
519
 
 
520
505
    def test_unable_encode_path(self):
521
506
        err = errors.UnableEncodePath('foo', 'executable')
522
507
        self.assertEqual("Unable to encode executable path 'foo' in "
720
705
                             repo.controldir.root_transport.base,
721
706
                             str(error))
722
707
 
723
 
    def test_unknown_bug_tracker_abbreviation(self):
724
 
        """Test the formatting of UnknownBugTrackerAbbreviation."""
725
 
        branch = self.make_branch('some_branch')
726
 
        error = errors.UnknownBugTrackerAbbreviation('xxx', branch)
727
 
        self.assertEqual(
728
 
            "Cannot find registered bug tracker called xxx on %s" % branch,
729
 
            str(error))
730
 
 
731
708
    def test_not_branch_bzrdir_with_repo(self):
732
709
        controldir = self.make_repository('repo').controldir
733
710
        err = errors.NotBranchError('path', controldir=controldir)