~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/fakevfat.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
import re
42
42
 
43
43
from bzrlib.errors import TransportNotPossible
44
 
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
 
44
from bzrlib.transport import decorator
45
45
 
46
46
 
47
47
# TODO: It might be nice if these hooks were available in a more general way
52
52
# which are not implemented here fail by default?
53
53
 
54
54
 
55
 
class FakeVFATTransportDecorator(TransportDecorator):
 
55
class FakeVFATTransportDecorator(decorator.TransportDecorator):
56
56
    """A decorator that can convert any transport to be readonly.
57
57
 
58
58
    This is requested via the 'vfat+' prefix to get_transport().
99
99
        return self._decorated.put_file(self._squash_name(relpath), f, mode)
100
100
 
101
101
 
102
 
class FakeVFATServer(DecoratorServer):
103
 
    """A server that suggests connections through FakeVFATTransportDecorator
104
 
 
105
 
    For use in testing.
106
 
    """
107
 
 
108
 
    def get_decorator_class(self):
109
 
        return FakeVFATTransportDecorator
110
 
 
111
 
 
112
102
def get_test_permutations():
113
103
    """Return the permutations to be used in testing."""
114
 
    return [(FakeVFATTransportDecorator, FakeVFATServer),
115
 
            ]
 
104
    from bzrlib.tests import test_server
 
105
    return [(FakeVFATTransportDecorator, test_server.FakeVFATServer),]