~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:18:01 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209171801-itzyi0ah1ywri49v
Fix some fallouts of moving test servers around.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
import bzrlib.trace
104
104
from bzrlib.transport import get_transport, pathfilter
105
105
import bzrlib.transport
106
 
from bzrlib.transport.local import LocalURLServer
107
 
from bzrlib.transport.memory import MemoryServer
108
 
from bzrlib.transport.readonly import ReadonlyServer
109
106
from bzrlib.trace import mutter, note
110
 
from bzrlib.tests import TestUtil
 
107
from bzrlib.tests import (
 
108
    test_server,
 
109
    TestUtil,
 
110
    )
111
111
from bzrlib.tests.http_server import HttpServer
112
112
from bzrlib.tests.TestUtil import (
113
113
                          TestSuite,
124
124
# shown frame is the test code, not our assertXYZ.
125
125
__unittest = 1
126
126
 
127
 
default_transport = LocalURLServer
 
127
default_transport = test_server.LocalURLServer
128
128
 
129
129
 
130
130
_unitialized_attr = object()
2175
2175
        if self.__readonly_server is None:
2176
2176
            if self.transport_readonly_server is None:
2177
2177
                # readonly decorator requested
2178
 
                self.__readonly_server = ReadonlyServer()
 
2178
                self.__readonly_server = test_serevr.ReadonlyServer()
2179
2179
            else:
2180
2180
                # explicit readonly transport.
2181
2181
                self.__readonly_server = self.create_transport_readonly_server()
2204
2204
        is no means to override it.
2205
2205
        """
2206
2206
        if self.__vfs_server is None:
2207
 
            self.__vfs_server = MemoryServer()
 
2207
            self.__vfs_server = test_server.MemoryServer()
2208
2208
            self.start_server(self.__vfs_server)
2209
2209
        return self.__vfs_server
2210
2210
 
2619
2619
            # We can only make working trees locally at the moment.  If the
2620
2620
            # transport can't support them, then we keep the non-disk-backed
2621
2621
            # branch and create a local checkout.
2622
 
            if self.vfs_transport_factory is LocalURLServer:
 
2622
            if self.vfs_transport_factory is test_server.LocalURLServer:
2623
2623
                # the branch is colocated on disk, we cannot create a checkout.
2624
2624
                # hopefully callers will expect this.
2625
2625
                local_controldir= bzrdir.BzrDir.open(self.get_vfs_only_url(relpath))
2685
2685
 
2686
2686
    def setUp(self):
2687
2687
        super(ChrootedTestCase, self).setUp()
2688
 
        if not self.vfs_transport_factory == MemoryServer:
 
2688
        if not self.vfs_transport_factory == test_server.MemoryServer:
2689
2689
            self.transport_readonly_server = HttpServer
2690
2690
 
2691
2691