~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_hooks.py

Merge fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib import (
20
20
    branch,
21
21
    errors,
 
22
    hooks as _mod_hooks,
22
23
    pyutils,
23
24
    tests,
24
25
    )
29
30
    known_hooks,
30
31
    known_hooks_key_to_object,
31
32
    known_hooks_key_to_parent_and_attribute,
32
 
    _lazy_hooks,
33
33
    )
34
34
from bzrlib.symbol_versioning import (
35
35
    deprecated_in,
124
124
        set_rh = lambda: None
125
125
        install_lazy_named_hook('bzrlib.tests.test_hooks',
126
126
            'TestHooks.hooks', 'set_rh', set_rh, "demo")
127
 
        set_rh_lazy_hooks = _lazy_hooks[
 
127
        set_rh_lazy_hooks = _mod_hooks._lazy_hooks[
128
128
            ('bzrlib.tests.test_hooks', 'TestHooks.hooks', 'set_rh')]
129
129
        self.assertEquals(1, len(set_rh_lazy_hooks))
130
130
        self.assertEquals(set_rh, set_rh_lazy_hooks[0][0].get_obj())
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 key, callbacks in _lazy_hooks.iteritems():
 
156
        for key, callbacks in _mod_hooks._lazy_hooks.iteritems():
157
157
            (module_name, member_name, hook_name) = key
158
158
            obj = pyutils.get_named_object(module_name, member_name)
159
159
            self.assertEquals(obj._module, module_name)