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

Upgraded to the latest 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
 
313
324
    def test_installed_hooks_are_BranchHooks(self):
314
325
        """The installed hooks object should be a BranchHooks."""
315
326
        # the installed hooks are saved in self._preserved_hooks.
316
 
        self.assertIsInstance(self._preserved_hooks, BranchHooks)
 
327
        self.assertIsInstance(self._preserved_hooks[_mod_branch.Branch], BranchHooks)
317
328
 
318
329
    def test_install_hook_raises_unknown_hook(self):
319
330
        """install_hook should raise UnknownHook if a hook is unknown."""