Rev 5040: selftest -s bt.test_bzrdir passing in file:///home/vila/src/bzr/cleanup/test-servers/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Feb 9 20:49:51 GMT 2010


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

------------------------------------------------------------
revno: 5040
revision-id: v.ladeuil+lp at free.fr-20100209204950-p86omh9xnn0w124a
parent: v.ladeuil+lp at free.fr-20100209204618-9saa1yof6i9bo38a
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 21:49:50 +0100
message:
  selftest -s bt.test_bzrdir passing
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2010-02-09 20:28:26 +0000
+++ b/bzrlib/tests/__init__.py	2010-02-09 20:49:50 +0000
@@ -2176,7 +2176,7 @@
         if self.__readonly_server is None:
             if self.transport_readonly_server is None:
                 # readonly decorator requested
-                self.__readonly_server = test_serevr.ReadonlyServer()
+                self.__readonly_server = test_server.ReadonlyServer()
             else:
                 # explicit readonly transport.
                 self.__readonly_server = self.create_transport_readonly_server()
@@ -2401,7 +2401,7 @@
 
     def setup_smart_server_with_call_log(self):
         """Sets up a smart server as the transport server with a call log."""
-        self.transport_server = server.SmartTCPServer_for_testing
+        self.transport_server = test_server.SmartTCPServer_for_testing
         self.hpss_calls = []
         import traceback
         # Skip the current stack down to the caller of

=== modified file 'bzrlib/tests/http_server.py'
--- a/bzrlib/tests/http_server.py	2010-01-07 03:03:01 +0000
+++ b/bzrlib/tests/http_server.py	2010-02-09 20:49:50 +0000
@@ -31,6 +31,7 @@
 import urlparse
 
 from bzrlib import transport
+from bzrlib.tests import test_server
 from bzrlib.transport import local
 
 
@@ -530,8 +531,9 @@
         """
         # XXX: TODO: make the server back onto vfs_server rather than local
         # disk.
-        if not (backing_transport_server is None or \
-                isinstance(backing_transport_server, local.LocalURLServer)):
+        if not (backing_transport_server is None
+                or isinstance(backing_transport_server,
+                              test_server.LocalURLServer)):
             raise AssertionError(
                 "HTTPServer currently assumes local transport, got %s" % \
                 backing_transport_server)

=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py	2010-01-08 07:34:31 +0000
+++ b/bzrlib/tests/test_bzrdir.py	2010-02-09 20:49:50 +0000
@@ -48,11 +48,11 @@
 from bzrlib.tests import(
     http_server,
     http_utils,
+    test_server,
     )
 from bzrlib.tests.test_http import TestWithTransport_pycurl
 from bzrlib.transport import get_transport
 from bzrlib.transport.http._urllib import HttpTransport_urllib
-from bzrlib.transport.memory import MemoryServer
 from bzrlib.transport.nosmart import NoSmartTransportDecorator
 from bzrlib.transport.readonly import ReadonlyTransportDecorator
 from bzrlib.repofmt import knitrepo, weaverepo, pack_repo
@@ -354,7 +354,7 @@
 
     def test_create_branch_convenience_root(self):
         """Creating a branch at the root of a fs should work."""
-        self.vfs_transport_factory = MemoryServer
+        self.vfs_transport_factory = test_server.MemoryServer
         # outside a repo the default convenience output is a repo+branch_tree
         format = bzrdir.format_registry.make_bzrdir('knit')
         branch = bzrdir.BzrDir.create_branch_convenience(self.get_url(),
@@ -565,7 +565,7 @@
 
     def setUp(self):
         super(ChrootedTests, self).setUp()
-        if not self.vfs_transport_factory == MemoryServer:
+        if not self.vfs_transport_factory == test_server.MemoryServer:
             self.transport_readonly_server = http_server.HttpServer
 
     def local_branch_path(self, branch):
@@ -1049,7 +1049,7 @@
 
     def setUp(self):
         super(NonLocalTests, self).setUp()
-        self.vfs_transport_factory = MemoryServer
+        self.vfs_transport_factory = test_server.MemoryServer
 
     def test_create_branch_convenience(self):
         # outside a repo the default convenience output is a repo+branch_tree



More information about the bazaar-commits mailing list