~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_hooks.py

  • Committer: Daniel Watkins
  • Date: 2008-04-20 08:21:39 UTC
  • mto: (3394.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3395.
  • Revision ID: d.m.watkins@warwick.ac.uk-20080420082139-3273sz01qsc98ddj
Updated tests to use install_named_hook.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    def test_hooks_with_unnamed_hook(self):
38
38
        self.make_branch('.')
39
39
        def foo(): return
40
 
        Branch.hooks.install_hook('set_rh', foo)
 
40
        Branch.hooks.install_named_hook('set_rh', foo, None)
41
41
        out, err = self.run_bzr('hooks')
42
42
        self._check_hooks_output(out, {'set_rh': ["No hook name"]})
43
43
 
45
45
        self.make_branch('.')
46
46
        def foo(): return
47
47
        name = "Foo Bar Hook"
48
 
        Branch.hooks.install_hook('set_rh', foo)
49
 
        Branch.hooks.name_hook(foo, name)
 
48
        Branch.hooks.install_named_hook('set_rh', foo, None)
50
49
        out, err = self.run_bzr('hooks')
51
50
        self._check_hooks_output(out, {'set_rh': [name]})
52
51