~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/chroot.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 10:01:21 UTC
  • mfrom: (5029.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100211100121-dqc7ja698m73k3tu
(vila) Move tests servers from bzrlib.transport to
        bzrlib.tests.test_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        return self._relpath_from_server_root(relpath)
66
66
 
67
67
 
68
 
class TestingChrootServer(ChrootServer):
69
 
 
70
 
    def __init__(self):
71
 
        """TestingChrootServer is not usable until start_server is called."""
72
 
        ChrootServer.__init__(self, None)
73
 
 
74
 
    def start_server(self, backing_server=None):
75
 
        """Setup the Chroot on backing_server."""
76
 
        if backing_server is not None:
77
 
            self.backing_transport = get_transport(backing_server.get_url())
78
 
        else:
79
 
            self.backing_transport = get_transport('.')
80
 
        ChrootServer.start_server(self)
81
 
 
82
 
 
83
68
def get_test_permutations():
84
69
    """Return the permutations to be used in testing."""
85
 
    return [(ChrootTransport, TestingChrootServer)]
 
70
    from bzrlib.tests import test_server
 
71
    return [(ChrootTransport, test_server.TestingChrootServer)]