~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-20 22:42:34 UTC
  • mfrom: (6083.1.2 more-get-transport-from)
  • Revision ID: pqm@pqm.ubuntu.com-20110820224234-l0c0cmesdnfp2srq
(jelmer) Use get_transport_from_path and get_transport_from_url in more
 places. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        server.start_server()
181
181
        self.addCleanup(server.stop_server)
182
182
 
183
 
        transport = _mod_transport.get_transport(server.get_url())
 
183
        transport = _mod_transport.get_transport_from_url(server.get_url())
184
184
        self.assertFalse(transport.abspath('/').endswith('/~/'))
185
185
        self.assertTrue(transport.abspath('/').endswith('/'))
186
186
        del transport
287
287
        """Test that a real connection attempt raises the right error"""
288
288
        from bzrlib.transport import ssh
289
289
        self.set_vendor(ssh.ParamikoVendor())
290
 
        t = _mod_transport.get_transport(self.bogus_url)
 
290
        t = _mod_transport.get_transport_from_url(self.bogus_url)
291
291
        self.assertRaises(errors.ConnectionError, t.get, 'foobar')
292
292
 
293
293
    def test_bad_connection_ssh(self):
488
488
            conf._get_config().update(
489
489
                {'sftptest': {'scheme': 'ssh', 'port': port, 'user': 'bar'}})
490
490
            conf._save()
491
 
        t = _mod_transport.get_transport('sftp://localhost:%d' % port)
 
491
        t = _mod_transport.get_transport_from_url(
 
492
            'sftp://localhost:%d' % port)
492
493
        # force a connection to be performed.
493
494
        t.has('foo')
494
495
        return t