~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/ftp_server/pyftpdlib_based.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-11 09:27:55 UTC
  • mfrom: (5017.3.46 test-servers)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100211092755-3vvu4vbwiwjjte3s
Move tests servers from bzrlib.transport to bzrlib.tests.test_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib import (
30
30
    osutils,
31
31
    trace,
32
 
    transport,
33
32
    )
 
33
from bzrlib.tests import test_server
34
34
 
35
35
 
36
36
class AnonymousWithWriteAccessAuthorizer(ftpserver.DummyAuthorizer):
133
133
        self.addr = self.socket.getsockname()
134
134
 
135
135
 
136
 
class FTPTestServer(transport.Server):
 
136
class FTPTestServer(test_server.TestServer):
137
137
    """Common code for FTP server facilities."""
138
138
 
139
139
    def __init__(self):
158
158
        self.logs.append(message)
159
159
 
160
160
    def start_server(self, vfs_server=None):
161
 
        from bzrlib.transport.local import LocalURLServer
162
 
        if not (vfs_server is None or isinstance(vfs_server, LocalURLServer)):
 
161
        if not (vfs_server is None or isinstance(vfs_server,
 
162
                                                 test_server.LocalURLServer)):
163
163
            raise AssertionError(
164
164
                "FTPServer currently assumes local transport, got %s"
165
165
                % vfs_server)