~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-20 22:42:34 UTC
  • mfrom: (6083.1.2 more-get-transport-from)
  • Revision ID: pqm@pqm.ubuntu.com-20110820224234-l0c0cmesdnfp2srq
(jelmer) Use get_transport_from_path and get_transport_from_url in more
 places. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1050
1050
        except NotImplementedError:
1051
1051
            raise TestSkipped("Transport %s has no bogus URL support." %
1052
1052
                              self._server.__class__)
1053
 
        t = _mod_transport.get_transport(url)
 
1053
        t = _mod_transport.get_transport_from_url(url)
1054
1054
        self.assertRaises((ConnectionError, NoSuchFile), t.get, '.bzr/branch')
1055
1055
 
1056
1056
    def test_stat(self):
1418
1418
 
1419
1419
        # smoke test for abspath on win32.
1420
1420
        # a transport based on 'file:///' never fully qualifies the drive.
1421
 
        transport = _mod_transport.get_transport("file:///")
 
1421
        transport = _mod_transport.get_transport_from_url("file:///")
1422
1422
        self.assertEqual(transport.abspath("/"), "file:///")
1423
1423
 
1424
1424
        # but a transport that starts with a drive spec must keep it.
1425
 
        transport = _mod_transport.get_transport("file:///C:/")
 
1425
        transport = _mod_transport.get_transport_from_url("file:///C:/")
1426
1426
        self.assertEqual(transport.abspath("/"), "file:///C:/")
1427
1427
 
1428
1428
    def test_local_abspath(self):
1788
1788
        base_url = self._server.get_url()
1789
1789
        parameters = {"key1": "val1", "key2": "val2"}
1790
1790
        url = urlutils.join_segment_parameters(base_url, parameters)
1791
 
        transport = _mod_transport.get_transport(url)
 
1791
        transport = _mod_transport.get_transport_from_url(url)
1792
1792
        self.assertEquals(parameters, transport.get_segment_parameters())
1793
1793
 
1794
1794
    def test_stat_symlink(self):