~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-01 02:16:14 UTC
  • mfrom: (3313.2.4 _SmartClient-takes-medium)
  • Revision ID: pqm@pqm.ubuntu.com-20080401021614-ec34l5pd7xp7bkku
Deprecate get_shared_medium,
        and pass medium & base directly into _SmartClient. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
        self.responses = responses
141
141
        self._calls = []
142
142
        self.expecting_body = False
143
 
        _SmartClient.__init__(self, FakeMedium(fake_medium_base, self._calls))
 
143
        _SmartClient.__init__(self, FakeMedium(self._calls), fake_medium_base)
144
144
 
145
145
    def call(self, method, *args):
146
146
        self._calls.append(('call', method, args))
162
162
 
163
163
class FakeMedium(object):
164
164
 
165
 
    def __init__(self, base, client_calls):
166
 
        self.base = base
167
 
        self.connection = FakeConnection(client_calls)
168
 
        self._client_calls = client_calls
169
 
 
170
 
 
171
 
class FakeConnection(object):
172
 
 
173
165
    def __init__(self, client_calls):
174
166
        self._remote_is_at_least_1_2 = True
175
167
        self._client_calls = client_calls