~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
36
36
    pathfilter,
37
37
    readonly,
38
38
    )
39
 
from bzrlib.tests import features
 
39
from bzrlib.tests import (
 
40
    features,
 
41
    test_server,
 
42
    )
40
43
 
41
44
 
42
45
# TODO: Should possibly split transport-specific tests into their own files.
593
596
 
594
597
    def test_fakenfs_server_default(self):
595
598
        # a FakeNFSServer() should bring up a local relpath server for itself
596
 
        server = fakenfs.FakeNFSServer()
 
599
        server = test_server.FakeNFSServer()
597
600
        self.start_server(server)
598
601
        # the url should be decorated appropriately
599
602
        self.assertStartsWith(server.get_url(), 'fakenfs+')
906
909
        # SFTPFullAbsoluteServer has a get_url method, and doesn't
907
910
        # override the interface (doesn't change self._vendor).
908
911
        # Note that this does encryption, so can be slow.
909
 
        from bzrlib.transport.sftp import SFTPFullAbsoluteServer
910
 
        from bzrlib.tests.stub_sftp import StubServer
 
912
        from bzrlib.tests import stub_sftp
911
913
 
912
914
        # Start an SSH server
913
915
        self.command_executed = []
916
918
        # SSH channel ourselves.  Surely this has already been implemented
917
919
        # elsewhere?
918
920
        started = []
919
 
        class StubSSHServer(StubServer):
 
921
        class StubSSHServer(stub_sftp.StubServer):
920
922
 
921
923
            test = self
922
924
 
950
952
 
951
953
                return True
952
954
 
953
 
        ssh_server = SFTPFullAbsoluteServer(StubSSHServer)
 
955
        ssh_server = stub_sftp.SFTPFullAbsoluteServer(StubSSHServer)
954
956
        # We *don't* want to override the default SSH vendor: the detected one
955
957
        # is the one to use.
956
958
        self.start_server(ssh_server)