Rev 5028: Move LogDecoratorServer 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:25:37 GMT 2010


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

------------------------------------------------------------
revno: 5028
revision-id: v.ladeuil+lp at free.fr-20100209172537-3g8c0bceylvf4byf
parent: v.ladeuil+lp at free.fr-20100209172411-crac3tglyj88bbqd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 18:25:37 +0100
message:
  Move LogDecoratorServer to bzrlib.tests.test_server
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2010-02-09 17:24:11 +0000
+++ b/bzrlib/tests/test_server.py	2010-02-09 17:25:37 +0000
@@ -164,6 +164,14 @@
         return FakeVFATTransportDecorator
 
 
+class LogDecoratorServer(DecoratorServer):
+    """Server for testing."""
+
+    def get_decorator_class(self):
+        from bzrlib.transport import log
+        return log.TransportLogDecorator
+
+
 class ReadonlyServer(DecoratorServer):
     """Server for the ReadonlyTransportDecorator for testing with."""
 

=== modified file 'bzrlib/transport/log.py'
--- a/bzrlib/transport/log.py	2010-02-04 10:01:41 +0000
+++ b/bzrlib/transport/log.py	2010-02-09 17:25:37 +0000
@@ -26,18 +26,10 @@
 import types
 
 from bzrlib.trace import mutter
-from bzrlib.transport.decorator import (
-    TransportDecorator,
-    )
-from bzrlib.transport.trace import (
-    DecoratorServer,
-    TransportTraceDecorator,
-    )
-
-
-
-
-class TransportLogDecorator(TransportDecorator):
+from bzrlib.transport import decorator
+
+
+class TransportLogDecorator(decprator.TransportDecorator):
     """Decorator for Transports that logs interesting operations to .bzr.log.
 
     In general we want to log things that usually take a network round trip
@@ -156,13 +148,7 @@
         return t
 
 
-class LogDecoratorServer(DecoratorServer):
-    """Server for testing."""
-
-    def get_decorator_class(self):
-        return TransportLogDecorator
-
-
 def get_test_permutations():
     """Return the permutations to be used in testing."""
-    return [(TransportLogDecorator, LogDecoratorServer)]
+    from bzrlib.tests import test_server
+    return [(TransportLogDecorator, test_server.LogDecoratorServer)]



More information about the bazaar-commits mailing list