~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Robert Collins
  • Date: 2006-11-22 02:49:26 UTC
  • mto: (2018.5.34 hpss)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: robertc@robertcollins.net-20061122024926-41ba3a48a35200ee
Implement a BzrDir.open_branch smart server method for opening a branch without VFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
        self.assertEqual(made_branch.base, target_branch.base)
163
163
        opened_branch = branch_dir.open_branch()
164
164
        self.assertEqual(opened_branch.base, target_branch.base)
 
165
 
 
166
    def test_get_reference(self):
 
167
        """For a BranchReference, get_reference should reutrn the location."""
 
168
        branch = self.make_branch('target')
 
169
        checkout = branch.create_checkout('checkout', lightweight=True)
 
170
        reference_url = branch.bzrdir.root_transport.abspath('') + '/'
 
171
        # if the api for create_checkout changes to return different checkout types
 
172
        # then this file read will fail.
 
173
        self.assertFileEqual(reference_url, 'checkout/.bzr/branch/location')
 
174
        self.assertEqual(reference_url,
 
175
            bzrlib.branch.BranchReferenceFormat().get_reference(checkout.bzrdir))