def test_call(self): client = RPCClient(HOST, PORT) ret = client.call('echo', 'message') eq_('message', ret) ret = client.call('echo', 'message' * 100) eq_('message' * 100, ret)
def test_call_server_side_exception(self): client = RPCClient(HOST, PORT) try: ret = client.call('raise_error') except RPCError, e: eq_('error msg', e.message) raise
def test_call_server_side_exception(self): client = RPCClient(HOST, PORT) try: ret = client.call('raise_error') except RPCError as e: eq_('error msg', str(e)) raise eq_('message', ret)
def test_call_socket_timeout(self): client = RPCClient(HOST, PORT, timeout=0.1) client.call('echo_delayed', 'message', 1)