~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_transport.py

  • Committer: Martin Packman
  • Date: 2011-12-23 19:38:22 UTC
  • mto: This revision was merged to the branch mainline in revision 6405.
  • Revision ID: martin.packman@canonical.com-20111223193822-hesheea4o8aqwexv
Accept and document passing the medium rather than transport for smart connections

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    _get_transport_modules,
58
58
    )
59
59
from bzrlib.transport.memory import MemoryTransport
 
60
from bzrlib.transport.remote import RemoteTransport
60
61
 
61
62
 
62
63
def get_transport_test_permutations(module):
1845
1846
        t = self.get_transport()
1846
1847
        self.assertEqual([], log)
1847
1848
        t.has("non-existant")
1848
 
        if isinstance(t, ConnectedTransport):
 
1849
        if isinstance(t, RemoteTransport):
 
1850
            self.assertEqual([t.get_smart_medium()], log)
 
1851
        elif isinstance(t, ConnectedTransport):
1849
1852
            self.assertEqual([t], log)
1850
1853
        else:
1851
1854
            self.assertEqual([], log)
1861
1864
        t1.has("x")
1862
1865
        t2.has("x")
1863
1866
        t3.has("x")
1864
 
        if isinstance(t1, ConnectedTransport):
 
1867
        if isinstance(t1, RemoteTransport):
 
1868
            self.assertEqual([t.get_smart_medium() for t in [t1, t3]], log)
 
1869
        elif isinstance(t1, ConnectedTransport):
1865
1870
            self.assertEqual([t1, t3], log)
1866
1871
        else:
1867
1872
            self.assertEqual([], log)