def test_mappings_to_heatmaps(dir_location, attack_version, rev):
    """Tests mappings_to_heatmaps.py with both framework entries"""
    dashed_rev = rev.replace('_', '-')
    attack_version_filepath = attack_version.replace('.', '_')[1:]  # turn v10.1 into 10_1
    controls_location = pathlib.Path(dir_location, "frameworks", f"attack_{attack_version_filepath}", rev,
                                     "stix", f"{dashed_rev}-controls.json")
    with open(controls_location, "r") as f:
        controls = json.load(f)["objects"]
    mappings_location = pathlib.Path(dir_location, "frameworks", f"attack_{attack_version_filepath}", rev,
                                     "stix", f"{dashed_rev}-mappings.json")
    with open(mappings_location, "r") as f:
        mappings = json.load(f)["objects"]
    output_location = pathlib.Path(dir_location, "frameworks", f"attack_{attack_version_filepath}", rev,
                                   "layers")
    attack_data = get_attack_data(dir_location, attack_version)

    mappings_to_heatmaps.main(
        framework=rev,
        attack_data=attack_data,
        controls=controls,
        mappings=mappings,
        domain="enterprise-attack",
        version=attack_version,
        output=output_location,
        clear=True,
        build_dir=True
    )
Tests mappings_to_heatmaps.py with both framework entries
tests/test_scripts.py