~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Andrew Bennetts
  • Date: 2008-03-28 08:05:51 UTC
  • mto: This revision was merged to the branch mainline in revision 3321.
  • Revision ID: andrew.bennetts@canonical.com-20080328080551-n7f6rejuycnzn0p8
Change _SmartClient's API to accept a medium and a base, rather than a _SharedConnection.

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