~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-15 00:34:05 UTC
  • mfrom: (3104.4.7 bzr-http-client)
  • Revision ID: pqm@pqm.ubuntu.com-20080115003405-jfuumkpctmvl2e4r
(andrew) Calculate remote path relative to the shared medium in
        _SmartClient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2358
2358
                         new_transport._http_transport)
2359
2359
        self.assertEqual('child_dir/foo', new_transport._remote_path('foo'))
2360
2360
 
2361
 
    def test_remote_path_after_clone_parent(self):
2362
 
        # However, accessing a parent directory should go direct to the parent's
2363
 
        # URL.  We don't send relpaths like "../foo" in smart requests.
2364
 
        base_transport = remote.RemoteHTTPTransport('bzr+http://host/path1/path2')
2365
 
        new_transport = base_transport.clone('..')
2366
 
        self.assertEqual('foo', new_transport._remote_path('foo'))
2367
 
        new_transport = base_transport.clone('../')
2368
 
        self.assertEqual('foo', new_transport._remote_path('foo'))
2369
 
        new_transport = base_transport.clone('../abc')
2370
 
        self.assertEqual('foo', new_transport._remote_path('foo'))
2371
 
        # "abc/../.." should be equivalent to ".."
2372
 
        new_transport = base_transport.clone('abc/../..')
2373
 
        self.assertEqual('foo', new_transport._remote_path('foo'))
2374
 
 
2375
2361
    def test_remote_path_unnormal_base(self):
2376
2362
        # If the transport's base isn't normalised, the _remote_path should
2377
2363
        # still be calculated correctly.