示例#1
0
def test_node_load_echo_module():
    # TODO : Enable tests
    return

    node = TestNode()
    assert node.is_alive

    node.remove_method(TEST_RPC_METHOD_ECHO_NAME)
    assert node.load_module(TEST_ECHO_MODULE)

    now = datetime.datetime.now()
    echoParam = now.strftime("%Y/%m/%d %H:%M:%S")

    assert node.post_method(TEST_RPC_METHOD_ECHO_NAME, echoParam)
    assert node.result == echoParam
示例#2
0
def test_node_echo():
    # TODO : Enable tests
    return

    node = TestNode()
    assert node.is_alive

    node.remove_method(TEST_RPC_METHOD_ECHO_NAME)
    assert node.set_method(TEST_RPC_METHOD_ECHO_NAME, constants.SCRIPT_LANGUAGE_PYTHON, TEST_PY_ECHO_CODE)

    now = datetime.datetime.now()
    echoParam = now.strftime("%Y/%m/%d %H:%M:%S")

    assert node.post_method(TEST_RPC_METHOD_ECHO_NAME, echoParam)
    assert node.result == echoParam