~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

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 '
442
442
                'the local current working directory.' % (backing_server,))