(test_dict, testcase_def_dict)
extend test with testcase definition
        test will merge and override testcase config definition.

    Args:
        test_dict (dict): test block
        testcase_def_dict (dict): testcase definition

    Returns:
        dict: extended test dict.
extend test with testcase definition
        test will merge and override testcase config definition.
extend test with testcase definition test will merge and override testcase config definition .
def _extend_with_testcase(test_dict, testcase_def_dict):
    """ extend test with testcase definition
        test will merge and override testcase config definition.

    Args:
        test_dict (dict): test block
        testcase_def_dict (dict): testcase definition

    Returns:
        dict: extended test dict.

    """
    # override testcase config variables
    testcase_def_dict["config"].setdefault("variables", {})
    testcase_def_variables = utils.ensure_mapping_format(testcase_def_dict["config"].get("variables", {}))
    testcase_def_variables.update(test_dict.pop("variables", {}))
    testcase_def_dict["config"]["variables"] = testcase_def_variables

    # override base_url, verify
    # priority: testcase config > testsuite tests
    test_base_url = test_dict.pop("base_url", "")
    if not testcase_def_dict["config"].get("base_url"):
        testcase_def_dict["config"]["base_url"] = test_base_url

    # override name
    test_name = test_dict.pop("name") or testcase_def_dict["config"].pop("name") or "Undefined name"

    # override testcase config name, output, etc.
    testcase_def_dict["config"].update(test_dict)
    testcase_def_dict["config"]["name"] = test_name

    test_dict.clear()
    test_dict.update(testcase_def_dict)
def _extend_with_testcase ( test_dict , testcase_def_dict ) : # override testcase config variables testcase_def_dict [ "config" ] . setdefault ( "variables" , { } ) testcase_def_variables = utils . ensure_mapping_format ( testcase_def_dict [ "config" ] . get ( "variables" , { } ) ) testcase_def_variables . update ( test_dict . pop ( "variables" , { } ) ) testcase_def_dict [ "config" ] [ "variables" ] = testcase_def_variables # override base_url, verify # priority: testcase config > testsuite tests test_base_url = test_dict . pop ( "base_url" , "" ) if not testcase_def_dict [ "config" ] . get ( "base_url" ) : testcase_def_dict [ "config" ] [ "base_url" ] = test_base_url # override name test_name = test_dict . pop ( "name" ) or testcase_def_dict [ "config" ] . pop ( "name" ) or "Undefined name" # override testcase config name, output, etc. testcase_def_dict [ "config" ] . update ( test_dict ) testcase_def_dict [ "config" ] [ "name" ] = test_name test_dict . clear ( ) test_dict . update ( testcase_def_dict )