~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
        opened_branch = branch_dir.open_branch()
299
299
        self.assertEqual(opened_branch.base, target_branch.base)
300
300
 
 
301
    def test_get_reference(self):
 
302
        """For a BranchReference, get_reference should reutrn the location."""
 
303
        branch = self.make_branch('target')
 
304
        checkout = branch.create_checkout('checkout', lightweight=True)
 
305
        reference_url = branch.bzrdir.root_transport.abspath('') + '/'
 
306
        # if the api for create_checkout changes to return different checkout types
 
307
        # then this file read will fail.
 
308
        self.assertFileEqual(reference_url, 'checkout/.bzr/branch/location')
 
309
        self.assertEqual(reference_url,
 
310
            _mod_branch.BranchReferenceFormat().get_reference(checkout.bzrdir))
 
311
 
301
312
 
302
313
class TestHooks(TestCase):
303
314