~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/nosmart.py

  • Committer: Matthew Fuller
  • Date: 2009-08-18 08:10:44 UTC
  • mto: (4772.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4773.
  • Revision ID: fullermd@over-yonder.net-20090818081044-2due6ius01c4pwjl
Fix up some doctests to handle things ending up as RevisionSpec_dwim's
instead of RS_revno, and ending up as _dwim's (which may error
eventually, but won't until we try to evaluate them) instead of
insta-errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
"""
23
23
 
24
24
from bzrlib import errors
25
 
from bzrlib.transport import decorator
26
 
 
27
 
 
28
 
class NoSmartTransportDecorator(decorator.TransportDecorator):
 
25
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
 
26
 
 
27
 
 
28
class NoSmartTransportDecorator(TransportDecorator):
29
29
    """A decorator for transports that disables get_smart_medium."""
30
30
 
31
31
    @classmethod
36
36
        raise errors.NoSmartMedium(self)
37
37
 
38
38
 
 
39
class NoSmartTransportServer(DecoratorServer):
 
40
    """Server for the NoSmartTransportDecorator for testing with."""
 
41
 
 
42
    def get_decorator_class(self):
 
43
        return NoSmartTransportDecorator
 
44
 
 
45
 
39
46
def get_test_permutations():
40
47
    """Return the permutations to be used in testing."""
41
 
    from bzrlib.tests import test_server
42
 
    return [(NoSmartTransportDecorator, test_server.NoSmartTransportServer)]
 
48
    return [(NoSmartTransportDecorator, NoSmartTransportServer)]
43
49