b.t.t.FakeClient(_SmartClient) : class documentation

Part of bzrlib.tests.test_remote View In Hierarchy

Lookalike for _SmartClient allowing testing.
Method __init__ Create a FakeClient.
Method add_expected_call Undocumented
Method add_success_response Undocumented
Method add_success_response_with_body Undocumented
Method add_error_response Undocumented
Method add_unknown_method_response Undocumented
Method finished_test Undocumented
Method call Call a method on the remote server.
Method call_expecting_body Call a method and return the result and the protocol object.
Method call_with_body_bytes Call a method on the remote server with body bytes.
Method call_with_body_bytes_expecting_body Call a method on the remote server with body bytes.
Method call_with_body_stream Undocumented
Method _get_next_response Undocumented
Method _check_call Undocumented

Inherited from _SmartClient:

Method __repr__ Undocumented
Method call_with_body_readv_array Undocumented
Method remote_path_from_transport Convert transport into a path suitable for using in a request.
Method _send_request Undocumented
Method _run_call_hooks Undocumented
Method _call_and_read_response Undocumented
Method _construct_protocol Undocumented
def __init__(self, fake_medium_base='fake base'):
Create a FakeClient.
def add_expected_call(self, call_name, call_args, response_type, response_args, response_body=None):
Undocumented
def add_success_response(self, *args):
Undocumented
def add_success_response_with_body(self, body, *args):
Undocumented
def add_error_response(self, *args):
Undocumented
def add_unknown_method_response(self, verb):
Undocumented
def finished_test(self):
Undocumented
def _get_next_response(self):
Undocumented
def _check_call(self, method, args):
Undocumented
def call(self, method, *args):
Call a method on the remote server.
def call_expecting_body(self, method, *args):

Call a method and return the result and the protocol object.

The body can be read like so:

result, smart_protocol = smart_client.call_expecting_body(...)
body = smart_protocol.read_body_bytes()
def call_with_body_bytes(self, method, args, body):
Call a method on the remote server with body bytes.
def call_with_body_bytes_expecting_body(self, method, args, body):
Call a method on the remote server with body bytes.
def call_with_body_stream(self, args, stream):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.