~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-08 17:52:59 UTC
  • mto: (5268.7.8 transport-segments)
  • mto: This revision was merged to the branch mainline in revision 6062.
  • Revision ID: jelmer@samba.org-20110808175259-putdqc0lnztp367v
Add UnparsedUrl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
    def test__remote_path_relative_root(self):
141
141
        # relative paths are preserved
142
142
        t = self.get_transport('')
143
 
        self.assertEqual('/~/', t._path)
 
143
        self.assertEqual('/~/', t._parsed_url.path)
144
144
        # the remote path should be relative to home dir
145
145
        # (i.e. not begining with a '/')
146
146
        self.assertEqual('a', t._remote_path('a'))
154
154
    def test_parse_url_with_home_dir(self):
155
155
        s = _mod_sftp.SFTPTransport(
156
156
            'sftp://ro%62ey:h%40t@example.com:2222/~/relative')
157
 
        self.assertEquals(s._host, 'example.com')
158
 
        self.assertEquals(s._port, 2222)
159
 
        self.assertEquals(s._user, 'robey')
160
 
        self.assertEquals(s._password, 'h@t')
161
 
        self.assertEquals(s._path, '/~/relative/')
 
157
        self.assertEquals(s._parsed_url.host, 'example.com')
 
158
        self.assertEquals(s._parsed_url.port, 2222)
 
159
        self.assertEquals(s._parsed_url.user, 'robey')
 
160
        self.assertEquals(s._parsed_url.password, 'h@t')
 
161
        self.assertEquals(s._parsed_url.path, '/~/relative/')
162
162
 
163
163
    def test_relpath(self):
164
164
        s = _mod_sftp.SFTPTransport('sftp://user@host.com/abs/path')