~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

Starting factoring out the smart server client "medium" from the protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
897
897
        except NotImplementedError:
898
898
            raise TestSkipped("Transport %s has no bogus URL support." %
899
899
                              self._server.__class__)
 
900
        # This should be:  but SSH still connects on construction. No COOKIE!
 
901
        # self.assertRaises((ConnectionError, NoSuchFile), t.get, '.bzr/branch')
900
902
        try:
901
903
            t = bzrlib.transport.get_transport(url)
902
904
            t.get('.bzr/branch')
1325
1327
            # as long as we got it we're fine
1326
1328
            pass
1327
1329
 
 
1330
    def test_get_smart_medium(self):
 
1331
        """All transports must either give a smart medium, or know they can't.
 
1332
        """
 
1333
        transport = self.get_transport()
 
1334
        try:
 
1335
            medium = transport.get_smart_medium()
 
1336
            self.assertIsInstance(medium, smart.SmartClientMedium)
 
1337
        except errors.NoSmartMedium:
 
1338
            # as long as we got it we're fine
 
1339
            pass
 
1340
 
1328
1341
    def test_readv_short_read(self):
1329
1342
        transport = self.get_transport()
1330
1343
        if transport.is_readonly():