Rev 5026: Move FakeVFATServer to bzrlib.tests.test_server in file:///home/vila/src/bzr/cleanup/test-servers/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Feb 9 17:22:25 GMT 2010


At file:///home/vila/src/bzr/cleanup/test-servers/

------------------------------------------------------------
revno: 5026
revision-id: v.ladeuil+lp at free.fr-20100209172225-21qcajx30gtbd5kx
parent: v.ladeuil+lp at free.fr-20100209172106-ayrc2am7lglvni3z
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 18:22:25 +0100
message:
  Move FakeVFATServer to bzrlib.tests.test_server
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2010-02-09 17:21:06 +0000
+++ b/bzrlib/tests/test_server.py	2010-02-09 17:22:25 +0000
@@ -153,6 +153,17 @@
         return fakenfs.FakeNFSTransportDecorator
 
 
+class FakeVFATServer(DecoratorServer):
+    """A server that suggests connections through FakeVFATTransportDecorator
+
+    For use in testing.
+    """
+
+    def get_decorator_class(self):
+        from bzrlib.transport import fakevfat
+        return FakeVFATTransportDecorator
+
+
 class ReadonlyServer(DecoratorServer):
     """Server for the ReadonlyTransportDecorator for testing with."""
 

=== modified file 'bzrlib/transport/fakevfat.py'
--- a/bzrlib/transport/fakevfat.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/fakevfat.py	2010-02-09 17:22:25 +0000
@@ -41,7 +41,7 @@
 import re
 
 from bzrlib.errors import TransportNotPossible
-from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
+from bzrlib.transport import decorator
 
 
 # TODO: It might be nice if these hooks were available in a more general way
@@ -52,7 +52,7 @@
 # which are not implemented here fail by default?
 
 
-class FakeVFATTransportDecorator(TransportDecorator):
+class FakeVFATTransportDecorator(decorator.TransportDecorator):
     """A decorator that can convert any transport to be readonly.
 
     This is requested via the 'vfat+' prefix to get_transport().
@@ -99,17 +99,7 @@
         return self._decorated.put_file(self._squash_name(relpath), f, mode)
 
 
-class FakeVFATServer(DecoratorServer):
-    """A server that suggests connections through FakeVFATTransportDecorator
-
-    For use in testing.
-    """
-
-    def get_decorator_class(self):
-        return FakeVFATTransportDecorator
-
-
 def get_test_permutations():
     """Return the permutations to be used in testing."""
-    return [(FakeVFATTransportDecorator, FakeVFATServer),
-            ]
+    from bzrlib.tests import test_server
+    return [(FakeVFATTransportDecorator, test_server.FakeVFATServer),]



More information about the bazaar-commits mailing list