~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-14 05:49:27 UTC
  • mfrom: (4476.3.86 inventory-delta)
  • Revision ID: pqm@pqm.ubuntu.com-20090814054927-k0k18dn46ax4b91f
(andrew) Add inventory-delta streaming for cross-format fetch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1938
1938
        sio.encoding = output_encoding
1939
1939
        return sio
1940
1940
 
 
1941
    def disable_verb(self, verb):
 
1942
        """Disable a smart server verb for one test."""
 
1943
        from bzrlib.smart import request
 
1944
        request_handlers = request.request_handlers
 
1945
        orig_method = request_handlers.get(verb)
 
1946
        request_handlers.remove(verb)
 
1947
        def restoreVerb():
 
1948
            request_handlers.register(verb, orig_method)
 
1949
        self.addCleanup(restoreVerb)
 
1950
 
1941
1951
 
1942
1952
class CapturedCall(object):
1943
1953
    """A helper for capturing smart server calls for easy debug analysis."""