~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-12 01:42:55 UTC
  • mfrom: (6055.2.12 unparsedurl)
  • Revision ID: pqm@pqm.ubuntu.com-20110812014255-y3thbw6gdn7cw6uz
(jelmer) Add a URL object for manipulating parsed URLs. (Jelmer Vernooij)

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')