Rev 5029: Move NoSmartTransportServer 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:27:47 GMT 2010


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

------------------------------------------------------------
revno: 5029
revision-id: v.ladeuil+lp at free.fr-20100209172746-6f4mvlnr2mac807j
parent: v.ladeuil+lp at free.fr-20100209172637-oayqkh821hh12m9c
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 18:27:46 +0100
message:
  Move NoSmartTransportServer to bzrlib.tests.test_server
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2010-02-09 17:26:37 +0000
+++ b/bzrlib/tests/test_server.py	2010-02-09 17:27:46 +0000
@@ -172,6 +172,14 @@
         return log.TransportLogDecorator
 
 
+class NoSmartTransportServer(DecoratorServer):
+    """Server for the NoSmartTransportDecorator for testing with."""
+
+    def get_decorator_class(self):
+        from bzrlib.transport import nosmart
+        return NoSmartTransportDecorator
+
+
 class ReadonlyServer(DecoratorServer):
     """Server for the ReadonlyTransportDecorator for testing with."""
 

=== modified file 'bzrlib/transport/nosmart.py'
--- a/bzrlib/transport/nosmart.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/nosmart.py	2010-02-09 17:27:46 +0000
@@ -22,10 +22,10 @@
 """
 
 from bzrlib import errors
-from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
-
-
-class NoSmartTransportDecorator(TransportDecorator):
+from bzrlib.transport import decorator
+
+
+class NoSmartTransportDecorator(decorator.TransportDecorator):
     """A decorator for transports that disables get_smart_medium."""
 
     @classmethod
@@ -36,14 +36,8 @@
         raise errors.NoSmartMedium(self)
 
 
-class NoSmartTransportServer(DecoratorServer):
-    """Server for the NoSmartTransportDecorator for testing with."""
-
-    def get_decorator_class(self):
-        return NoSmartTransportDecorator
-
-
 def get_test_permutations():
     """Return the permutations to be used in testing."""
-    return [(NoSmartTransportDecorator, NoSmartTransportServer)]
+    from bzrlib.tests import test_server
+    return [(NoSmartTransportDecorator, test_server.NoSmartTransportServer)]
 



More information about the bazaar-commits mailing list