~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: 2007-04-30 04:00:06 UTC
  • mfrom: (2466.3.1 normalize-remote-http-urls)
  • Revision ID: pqm@pqm.ubuntu.com-20070430040006-olr7xpzdbp02y1sd
(Andrew Bennetts) Normalise URLs in RemoteHTTPTransport before doing URL calculations to fix bad results.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2087
2087
        new_transport = base_transport.clone('abc/../..')
2088
2088
        self.assertEqual('foo', new_transport._remote_path('foo'))
2089
2089
 
 
2090
    def test_remote_path_unnormal_base(self):
 
2091
        # If the transport's base isn't normalised, the _remote_path should
 
2092
        # still be calculated correctly.
 
2093
        base_transport = remote.RemoteHTTPTransport('bzr+http://host/%7Ea/b')
 
2094
        self.assertEqual('c', base_transport._remote_path('c'))
 
2095
 
 
2096
    def test_clone_unnormal_base(self):
 
2097
        # If the transport's base isn't normalised, cloned transports should
 
2098
        # still work correctly.
 
2099
        base_transport = remote.RemoteHTTPTransport('bzr+http://host/%7Ea/b')
 
2100
        new_transport = base_transport.clone('c')
 
2101
        self.assertEqual('bzr+http://host/%7Ea/b/c/', new_transport.base)
 
2102
 
2090
2103
        
2091
2104
# TODO: Client feature that does get_bundle and then installs that into a
2092
2105
# branch; this can be used in place of the regular pull/fetch operation when