~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_hooks.py

  • Committer: Jelmer Vernooij
  • Date: 2011-01-23 00:24:17 UTC
  • mto: (5622.4.1 uninstall-hook)
  • mto: This revision was merged to the branch mainline in revision 5669.
  • Revision ID: jelmer@samba.org-20110123002417-1vnpr8dvkz8ysfhd
more tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
    def test_valid_lazy_hooks(self):
154
154
        # Make sure that all the registered lazy hooks are referring to existing
155
155
        # hook points which allow lazy registration.
156
 
        for (module_name, member_name, hook_name) in _lazy_hooks:
 
156
        for key, callbacks in _lazy_hooks.iteritems():
 
157
            (module_name, member_name, hook_name) = key
157
158
            obj = pyutils.get_named_object(module_name, member_name)
158
159
            self.assertEquals(obj._module, module_name)
159
160
            self.assertEquals(obj._member_name, member_name)
160
161
            self.assertTrue(hook_name in obj)
 
162
            self.assertIs(callbacks, obj[hook_name]._callbacks)
161
163
 
162
164
 
163
165
class TestHook(tests.TestCase):