~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Robert Collins
  • Date: 2007-06-28 03:08:53 UTC
  • mto: This revision was merged to the branch mainline in revision 2560.
  • Revision ID: robertc@robertcollins.net-20070628030853-fjeb7ii5euyvi7c1
Give Hooks names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
326
326
        # the installed hooks are saved in self._preserved_hooks.
327
327
        self.assertIsInstance(self._preserved_hooks[_mod_branch.Branch], BranchHooks)
328
328
 
329
 
    def test_install_hook_raises_unknown_hook(self):
330
 
        """install_hook should raise UnknownHook if a hook is unknown."""
331
 
        hooks = BranchHooks()
332
 
        self.assertRaises(UnknownHook, hooks.install_hook, 'silly', None)
333
 
 
334
 
    def test_install_hook_appends_known_hook(self):
335
 
        """install_hook should append the callable for known hooks."""
336
 
        hooks = BranchHooks()
337
 
        hooks.install_hook('set_rh', None)
338
 
        self.assertEqual(hooks['set_rh'], [None])
339
 
 
340
329
 
341
330
class TestPullResult(TestCase):
342
331