~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

Merge with get_file_sha1

Show diffs side-by-side

added added

removed removed

Lines of Context:
801
801
    def _clear_hooks(self):
802
802
        # prevent hooks affecting tests
803
803
        import bzrlib.branch
 
804
        import bzrlib.smart.client
804
805
        import bzrlib.smart.server
805
806
        self._preserved_hooks = {
806
807
            bzrlib.branch.Branch: bzrlib.branch.Branch.hooks,
807
808
            bzrlib.mutabletree.MutableTree: bzrlib.mutabletree.MutableTree.hooks,
 
809
            bzrlib.smart.client._SmartClient: bzrlib.smart.client._SmartClient.hooks,
808
810
            bzrlib.smart.server.SmartTCPServer: bzrlib.smart.server.SmartTCPServer.hooks,
809
811
            }
810
812
        self.addCleanup(self._restoreHooks)
811
813
        # reset all hooks to an empty instance of the appropriate type
812
814
        bzrlib.branch.Branch.hooks = bzrlib.branch.BranchHooks()
 
815
        bzrlib.smart.client._SmartClient.hooks = bzrlib.smart.client.SmartClientHooks()
813
816
        bzrlib.smart.server.SmartTCPServer.hooks = bzrlib.smart.server.SmartServerHooks()
814
817
 
815
818
    def _silenceUI(self):