def test_parse_framework(dir_location, attack_version, rev):
    """Tests parse_r4.py.bak.bak.bak with both frameworks"""
    dashed_rev = rev.replace('_', '-')
    attack_version_filepath = attack_version.replace('.', '_')[1:]  # turn v10.1 into 10_1
    dashed_attack_version = attack_version_filepath.replace('_', '-')
    rx_input_controls = pathlib.Path(dir_location, "data", "controls", f"{dashed_rev}-controls.tsv")
    rx_input_mappings = pathlib.Path(dir_location, "data", "mappings",
                                     f"attack-{dashed_attack_version}-to-{dashed_rev}-mappings.tsv")
    rx_output_controls = pathlib.Path(dir_location, "frameworks", f"attack_{attack_version_filepath}", rev,
                                      "stix", f"{dashed_rev}-controls.json")
    rx_output_mappings = pathlib.Path(dir_location, "frameworks", f"attack_{attack_version_filepath}", rev,
                                      "stix", f"{dashed_rev}-mappings.json")
    attack_data = get_attack_data(dir_location, attack_version)
    if rev == R4:
        framework_id = "NIST 800-53 Revision 4"
    elif rev == R5:
        framework_id = "NIST 800-53 Revision 5"
    else:
        raise ValueError(f"Unknown revision: {rev}")

    parse.main(
        in_controls=rx_input_controls,
        in_mappings=rx_input_mappings,
        out_controls=rx_output_controls,
        out_mappings=rx_output_mappings,
        framework_id=framework_id,
        attack_data=attack_data,
    )
Tests parse_r4.py.bak.bak.bak with both frameworks
tests/test_scripts.py