~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2008-05-02 02:31:14 UTC
  • mfrom: (3399 +trunk)
  • mto: (3408.1.1 doc)
  • mto: This revision was merged to the branch mainline in revision 3409.
  • Revision ID: mbp@sourcefrog.net-20080502023114-y2gcg3w3jc770j9m
merge trunk

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, name)
50
49
        out, err = self.run_bzr('hooks')
51
50
        self._check_hooks_output(out, {'set_rh': [name]})
52
51