data_Utils.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:warriorframework 作者: warriorframework 项目源码 文件源码
def verify_resp_inorder(match_list, context_list, command, response,
                        varconfigfile=None, verify_on_list=None,
                        verify_list=None, remote_resp_dict=None,
                        verify_group=None):
    """ Method for in-order search.
    Verifies the 'search strings' in the system response
    and also verifies whether they are in order or not """

    msg = ("In-order verification requested for the command: "
           "'{0}' ".format(command))
    testcase_Utils.pNote(msg, "debug")

    if varconfigfile and varconfigfile is not None:
        match_list = string_Utils.sub_from_varconfig(varconfigfile, match_list)

    status = True
    if isinstance(verify_list, str):
        verify_list = verify_list.split(",")

    resp_details_dict = _get_resp_details(match_list, context_list,
                                          verify_on_list, verify_list,
                                          remote_resp_dict)

    for system in resp_details_dict:
        if resp_details_dict[system]:
            sys_status = verify_inorder_cmd_response(match_list, verify_list,
                                                     system, command,
                                                     resp_details_dict[system],
                                                     verify_group)
        else:
            pNote("Verification can not be done for the system : "
                  "{0}".format(system), "error")
            sys_status = "ERROR"

    status = "ERROR" if sys_status == "ERROR" else status and sys_status
    return status
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号