Rev 5024: Move FakeNFSServer 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:19:50 GMT 2010


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

------------------------------------------------------------
revno: 5024
revision-id: v.ladeuil+lp at free.fr-20100209171950-nxdtof8b29fene6e
parent: v.ladeuil+lp at free.fr-20100209171801-itzyi0ah1ywri49v
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 18:19:50 +0100
message:
  Move FakeNFSServer to bzrlib.tests.test_server
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2010-02-09 17:18:01 +0000
+++ b/bzrlib/tests/test_server.py	2010-02-09 17:19:50 +0000
@@ -137,6 +137,14 @@
         return self.get_url_prefix() + self._server.get_url()
 
 
+class FakeNFSServer(DecoratorServer):
+    """Server for the FakeNFSTransportDecorator for testing with."""
+
+    def get_decorator_class(self):
+        from bzrlib.transport import fakenfs
+        return fakenfs.FakeNFSTransportDecorator
+
+
 class ReadonlyServer(DecoratorServer):
     """Server for the ReadonlyTransportDecorator for testing with."""
 

=== modified file 'bzrlib/transport/fakenfs.py'
--- a/bzrlib/transport/fakenfs.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/fakenfs.py	2010-02-09 17:19:50 +0000
@@ -28,10 +28,10 @@
     errors,
     urlutils,
     )
-from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
-
-
-class FakeNFSTransportDecorator(TransportDecorator):
+from bzrlib.transport import decorator
+
+
+class FakeNFSTransportDecorator(decorator.TransportDecorator):
     """A transport that behaves like NFS, for testing"""
 
     @classmethod
@@ -62,14 +62,7 @@
         return self._decorated.delete(relpath)
 
 
-class FakeNFSServer(DecoratorServer):
-    """Server for the FakeNFSTransportDecorator for testing with."""
-
-    def get_decorator_class(self):
-        return FakeNFSTransportDecorator
-
-
 def get_test_permutations():
     """Return the permutations to be used in testing."""
-    return [(FakeNFSTransportDecorator, FakeNFSServer),
-            ]
+    from bzrlib.tests import test_server
+    return [(FakeNFSTransportDecorator, test_server.FakeNFSServer),]



More information about the bazaar-commits mailing list