~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

Merge cleanup into texinfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    TestSkipped,
42
42
    )
43
43
from bzrlib.tests.http_server import HttpServer
44
 
from bzrlib.transport import get_transport
45
44
import bzrlib.transport.http
46
45
 
47
46
if features.paramiko.available():
190
189
        server = stub_sftp.SFTPSiblingAbsoluteServer()
191
190
        server.start_server()
192
191
        try:
193
 
            transport = get_transport(server.get_url())
 
192
            transport = _mod_transport.get_transport(server.get_url())
194
193
            self.assertFalse(transport.abspath('/').endswith('/~/'))
195
194
            self.assertTrue(transport.abspath('/').endswith('/'))
196
195
            del transport
313
312
        """Test that a real connection attempt raises the right error"""
314
313
        from bzrlib.transport import ssh
315
314
        self.set_vendor(ssh.ParamikoVendor())
316
 
        t = bzrlib.transport.get_transport(self.bogus_url)
 
315
        t = _mod_transport.get_transport(self.bogus_url)
317
316
        self.assertRaises(errors.ConnectionError, t.get, 'foobar')
318
317
 
319
318
    def test_bad_connection_ssh(self):
324
323
        # However, 'ssh' will create stipple on the output, so instead
325
324
        # I'm using run_bzr_subprocess, and parsing the output
326
325
        # try:
327
 
        #     t = bzrlib.transport.get_transport(self.bogus_url)
 
326
        #     t = _mod_transport.get_transport(self.bogus_url)
328
327
        # except errors.ConnectionError:
329
328
        #     # Correct error
330
329
        #     pass
511
510
            conf._get_config().update(
512
511
                {'sftptest': {'scheme': 'ssh', 'port': port, 'user': 'bar'}})
513
512
            conf._save()
514
 
        t = get_transport('sftp://localhost:%d' % port)
 
513
        t = _mod_transport.get_transport('sftp://localhost:%d' % port)
515
514
        # force a connection to be performed.
516
515
        t.has('foo')
517
516
        return t