Rev 5030: Move UnlistableServer 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:29:26 GMT 2010


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

------------------------------------------------------------
revno: 5030
revision-id: v.ladeuil+lp at free.fr-20100209172926-4kgu4aglg29xt3t1
parent: v.ladeuil+lp at free.fr-20100209172746-6f4mvlnr2mac807j
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 18:29:26 +0100
message:
  Move UnlistableServer to bzrlib.tests.test_server
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2010-02-09 17:27:46 +0000
+++ b/bzrlib/tests/test_server.py	2010-02-09 17:29:26 +0000
@@ -196,3 +196,11 @@
         return TransportTraceDecorator
 
 
+class UnlistableServer(DecoratorServer):
+    """Server for the UnlistableTransportDecorator for testing with."""
+
+    def get_decorator_class(self):
+        from bzrlib.transport import unlistable
+        return unlistable.UnlistableTransportDecorator
+
+

=== modified file 'bzrlib/transport/unlistable.py'
--- a/bzrlib/transport/unlistable.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/unlistable.py	2010-02-09 17:29:26 +0000
@@ -18,10 +18,10 @@
 
 import bzrlib.errors as errors
 from bzrlib.transport import Transport
-from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
-
-
-class UnlistableTransportDecorator(TransportDecorator):
+from bzrlib.transport import decorator
+
+
+class UnlistableTransportDecorator(decorator.TransportDecorator):
     """A transport that disables file listing for testing."""
 
     @classmethod
@@ -39,14 +39,7 @@
         Transport.list_dir(self, relpath)
 
 
-class UnlistableServer(DecoratorServer):
-    """Server for the UnlistableTransportDecorator for testing with."""
-
-    def get_decorator_class(self):
-        return UnlistableTransportDecorator
-
-
 def get_test_permutations():
     """Return the permutations to be used in testing."""
-    return [(UnlistableTransportDecorator, UnlistableServer),
-            ]
+    from bzrlib.tests import test_server
+    return [(UnlistableTransportDecorator, test_server.UnlistableServer),]



More information about the bazaar-commits mailing list