~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-16 01:50:48 UTC
  • mfrom: (2078 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: john@arbash-meinel.com-20061016015048-0f22df07e38093da
[merge] bzr.dev 2078

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')
1309
1311
        self.assertEqual(d[2], (0, '0'))
1310
1312
        self.assertEqual(d[3], (3, '34'))
1311
1313
 
1312
 
    def test_get_smart_client(self):
1313
 
        """All transports must either give a smart client, or know they can't.
1314
 
 
1315
 
        For some transports such as http this might depend on probing to see 
1316
 
        what's actually present on the other end.  (But we can adjust for that 
1317
 
        in the future.)
 
1314
    def test_get_smart_medium(self):
 
1315
        """All transports must either give a smart medium, or know they can't.
1318
1316
        """
1319
1317
        transport = self.get_transport()
1320
1318
        try:
1321
 
            client = transport.get_smart_client()
1322
 
            # XXX: should be a more general class
1323
 
            self.assertIsInstance(client, smart.SmartStreamClient)
1324
 
        except NoSmartServer:
 
1319
            medium = transport.get_smart_medium()
 
1320
            self.assertIsInstance(medium, smart.SmartClientMedium)
 
1321
        except errors.NoSmartMedium:
1325
1322
            # as long as we got it we're fine
1326
1323
            pass
1327
1324