~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/HttpServer.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-29 04:35:40 UTC
  • mfrom: (2381.1.4 hpss-test-correctness)
  • Revision ID: pqm@pqm.ubuntu.com-20070329043540-952aff23533c1c26
(robertc) Various test suite changes and cleanups in preparation for the next hpss branch. (Robert Collins, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import urlparse
30
30
 
31
31
from bzrlib.transport import Server
 
32
from bzrlib.transport.local import LocalURLServer
32
33
 
33
34
 
34
35
class WebserverNotAvailable(Exception):
304
305
        """Capture Server log output."""
305
306
        self.logs.append(format % args)
306
307
 
307
 
    def setUp(self):
308
 
        """See bzrlib.transport.Server.setUp."""
 
308
    def setUp(self, backing_transport_server=None):
 
309
        """See bzrlib.transport.Server.setUp.
 
310
        
 
311
        :param backing_transport_server: The transport that requests over this
 
312
            protocol should be forwarded to. Note that this is currently not
 
313
            supported for HTTP.
 
314
        """
 
315
        # XXX: TODO: make the server back onto vfs_server rather than local
 
316
        # disk.
 
317
        assert backing_transport_server is None or \
 
318
            isinstance(backing_transport_server, LocalURLServer), \
 
319
            "HTTPServer currently assumes local transport, got %s" % \
 
320
            backing_transport_server
309
321
        self._home_dir = os.getcwdu()
310
322
        self._local_path_parts = self._home_dir.split(os.path.sep)
311
323
        self._http_starting = threading.Lock()