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

  • Committer: Jelmer Vernooij
  • Date: 2017-07-30 23:53:38 UTC
  • mfrom: (6734.1.22 move-errors-more)
  • Revision ID: jelmer@jelmer.uk-20170730235338-25jy0lgifkyx796l
Merge lp:~jelmer/brz/move-errors-more.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    )
45
45
 
46
46
 
 
47
class TestErrors(tests.TestCase):
 
48
 
 
49
    def test_unstackable_branch_format(self):
 
50
        format = u'foo'
 
51
        url = "/foo"
 
52
        error = _mod_branch.UnstackableBranchFormat(format, url)
 
53
        self.assertEqualDiff(
 
54
            "The branch '/foo'(foo) is not a stackable format. "
 
55
            "You will need to upgrade the branch to permit branch stacking.",
 
56
            str(error))
 
57
 
 
58
 
47
59
class TestDefaultFormat(tests.TestCase):
48
60
 
49
61
    def test_default_format(self):
356
368
 
357
369
    def test_set_stacked_on_url_errors(self):
358
370
        branch = self.make_branch('a', format=self.get_format_name())
359
 
        self.assertRaises(errors.UnstackableBranchFormat,
 
371
        self.assertRaises(_mod_branch.UnstackableBranchFormat,
360
372
            branch.set_stacked_on_url, None)
361
373
 
362
374
    def test_default_stacked_location(self):
363
375
        branch = self.make_branch('a', format=self.get_format_name())
364
 
        self.assertRaises(errors.UnstackableBranchFormat, branch.get_stacked_on_url)
 
376
        self.assertRaises(_mod_branch.UnstackableBranchFormat, branch.get_stacked_on_url)
365
377
 
366
378
 
367
379
class TestBranch7(TestBranch67, tests.TestCaseWithTransport):