def test_get_error_need_raise_error_on_non_error_input():
    execute_command_results = [{
        "Type": entryTypes["note"],
        "ContentsFormat": formats["text"],
        "Contents": "this is not an error"
    }]
    with pytest.raises(ValueError) as exception:
        get_error(execute_command_results)

    assert "execute_command_result has no error entry. before using get_error use is_error" in str(
        exception)
def test_get_error():
    execute_command_results = [{
        "Type": entryTypes["error"],
        "ContentsFormat": formats["text"],
        "Contents": "this is error message"
    }]
    error = get_error(execute_command_results)
    assert error == "this is error message"