~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-19 22:34:02 UTC
  • mto: This revision was merged to the branch mainline in revision 6089.
  • Revision ID: jelmer@samba.org-20110819223402-wjywqb0fa1xxx522
Use get_transport_from_{url,path} in more places.

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