~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

PyCurl range-request integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
    def get_transport(self):
82
82
        """Return a connected transport to the local directory."""
83
 
        t = bzrlib.transport.get_transport(self._server.get_url())
84
 
        self.failUnless(isinstance(t, self.transport_class), 
85
 
                        "Got the wrong class from get_transport"
86
 
                        "(%r, expected %r)" % (t.__class__, 
87
 
                                               self.transport_class))
 
83
        base_url = self._server.get_url()
 
84
        t = bzrlib.transport.get_transport(base_url)
 
85
        if not isinstance(t, self.transport_class):
 
86
            # we want to make sure to construct one particular class, even if
 
87
            # there are several available implementations of this transport;
 
88
            # therefore construct it by hand rather than through the regular
 
89
            # get_transport method
 
90
            t = self.transport_class(base_url)
88
91
        return t
89
92
 
90
93
    def assertListRaises(self, excClass, func, *args, **kwargs):
827
830
        # that have aliasing problems like symlinks should go in backend
828
831
        # specific test cases.
829
832
        transport = self.get_transport()
 
833
        
 
834
        # disabled because some transports might normalize urls in generating
 
835
        # the abspath - eg http+pycurl-> just http -- mbp 20060308 
830
836
        self.assertEqual(transport.base + 'relpath',
831
837
                         transport.abspath('relpath'))
832
838