~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.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:
33
33
    urlutils,
34
34
    )
35
35
from bzrlib.transport import (
36
 
    local,
37
 
    Server,
38
36
    ssh,
39
37
    )
 
38
from bzrlib.tests import test_server
 
39
 
40
40
 
41
41
class StubServer (paramiko.ServerInterface):
42
42
 
382
382
        return bytes_sent
383
383
 
384
384
 
385
 
class SFTPServer(Server):
 
385
class SFTPServer(test_server.TestServer):
386
386
    """Common code for SFTP server facilities."""
387
387
 
388
388
    def __init__(self, server_interface=StubServer):
436
436
        # XXX: TODO: make sftpserver back onto backing_server rather than local
437
437
        # disk.
438
438
        if not (backing_server is None or
439
 
                isinstance(backing_server, local.LocalURLServer)):
 
439
                isinstance(backing_server, test_server.LocalURLServer)):
440
440
            raise AssertionError(
441
441
                "backing_server should not be %r, because this can only serve the "
442
442
                "local current working directory." % (backing_server,))