~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Martin Pool
  • Date: 2008-07-15 04:43:19 UTC
  • mto: This revision was merged to the branch mainline in revision 3542.
  • Revision ID: mbp@sourcefrog.net-20080715044319-wy26hdr8kvrb0ne9
Rename branch.get_stacked_on to get_stacked_on_url

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
 
326
326
    def test_default_stacked_location(self):
327
327
        branch = self.make_branch('a', format=self.get_format_name())
328
 
        self.assertRaises(errors.UnstackableBranchFormat, branch.get_stacked_on)
 
328
        self.assertRaises(errors.UnstackableBranchFormat, branch.get_stacked_on_url)
329
329
 
330
330
 
331
331
class TestBranch7(TestBranch67, TestCaseWithTransport):
349
349
 
350
350
    def _test_default_stacked_location(self):
351
351
        branch = self.make_branch('a', format=self.get_format_name())
352
 
        self.assertRaises(errors.NotStacked, branch.get_stacked_on)
 
352
        self.assertRaises(errors.NotStacked, branch.get_stacked_on_url)
353
353
 
354
354
    def test_stack_and_unstack(self):
355
355
        branch = self.make_branch('a', format=self.get_format_name())
356
356
        target = self.make_branch_and_tree('b', format=self.get_format_name())
357
357
        branch.set_stacked_on(target.branch.base)
358
 
        self.assertEqual(target.branch.base, branch.get_stacked_on())
 
358
        self.assertEqual(target.branch.base, branch.get_stacked_on_url())
359
359
        revid = target.commit('foo')
360
360
        self.assertTrue(branch.repository.has_revision(revid))
361
361
        branch.set_stacked_on(None)
362
 
        self.assertRaises(errors.NotStacked, branch.get_stacked_on)
 
362
        self.assertRaises(errors.NotStacked, branch.get_stacked_on_url)
363
363
        self.assertFalse(branch.repository.has_revision(revid))
364
364
 
365
365
    def test_open_opens_stacked_reference(self):