Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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
Example #4
0
    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)
Example #5
0
    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)
Example #6
0
    def test_call_socket_timeout(self):
        client = RPCClient(HOST, PORT, timeout=0.1)

        client.call('echo_delayed', 'message', 1)
Example #7
0
    def test_call_socket_timeout(self):
        client = RPCClient(HOST, PORT, timeout=0.1)

        client.call('echo_delayed', 'message', 1)