~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/unlistable.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import bzrlib.errors as errors
20
20
from bzrlib.transport import Transport
21
 
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
22
 
 
23
 
 
24
 
class UnlistableTransportDecorator(TransportDecorator):
 
21
from bzrlib.transport import decorator
 
22
 
 
23
 
 
24
class UnlistableTransportDecorator(decorator.TransportDecorator):
25
25
    """A transport that disables file listing for testing."""
26
26
 
27
27
    @classmethod
39
39
        Transport.list_dir(self, relpath)
40
40
 
41
41
 
42
 
class UnlistableServer(DecoratorServer):
43
 
    """Server for the UnlistableTransportDecorator for testing with."""
44
 
 
45
 
    def get_decorator_class(self):
46
 
        return UnlistableTransportDecorator
47
 
 
48
 
 
49
42
def get_test_permutations():
50
43
    """Return the permutations to be used in testing."""
51
 
    return [(UnlistableTransportDecorator, UnlistableServer),
52
 
            ]
 
44
    from bzrlib.tests import test_server
 
45
    return [(UnlistableTransportDecorator, test_server.UnlistableServer),]