/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: Andrew Bennetts
  • Date: 2007-04-11 06:40:05 UTC
  • mfrom: (2404 +trunk)
  • mto: (2018.5.146 hpss)
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: andrew.bennetts@canonical.com-20070411064005-zylli6el5cz7kwnb
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
from bzrlib.symbol_versioning import zero_eleven
39
39
from bzrlib.tests import TestCaseInTempDir, TestSkipped
40
40
from bzrlib.tests.test_transport import TestTransportImplementation
41
 
from bzrlib.transport import memory, smart
 
41
from bzrlib.smart import medium
 
42
from bzrlib.transport import memory, remote
42
43
import bzrlib.transport
43
44
 
44
45
 
45
 
def _append(fn, txt):
46
 
    """Append the given text (file-like object) to the supplied filename."""
47
 
    f = open(fn, 'ab')
48
 
    try:
49
 
        f.write(txt.read())
50
 
    finally:
51
 
        f.close()
52
 
 
53
 
 
54
46
class TransportTests(TestTransportImplementation):
55
47
 
 
48
    def setUp(self):
 
49
        super(TransportTests, self).setUp()
 
50
        self._captureVar('BZR_NO_SMART_VFS', None)
 
51
 
56
52
    def check_transport_contents(self, content, transport, relpath):
57
53
        """Check that transport.get(relpath).read() == content."""
58
54
        self.assertEqualDiff(content, transport.get(relpath).read())
1315
1311
        transport = self.get_transport()
1316
1312
        try:
1317
1313
            client_medium = transport.get_smart_medium()
1318
 
            self.assertIsInstance(client_medium, smart.SmartClientMedium)
 
1314
            self.assertIsInstance(client_medium, medium.SmartClientMedium)
1319
1315
        except errors.NoSmartMedium:
1320
1316
            # as long as we got it we're fine
1321
1317
            pass