def METHOD_NAME(make_tmp_jid_dirs, tmp_jid_dir):
    """
    Tests that the entire JID dir is removed when the jid_file is not a file.
    This scenario indicates a corrupted cache entry, so the entire dir is scrubbed.
    """
    # Create temp job cache dir and jid file
    jid_dir, jid_file = make_tmp_jid_dirs()
    # Make sure there is a jid file in a new job cache director
    jid_dir_name = jid_file.rpartition(os.sep)[2]
    assert jid_dir_name == "jid"
    # Even though we created a valid jid file in the _make_tmp_jid_dirs call to get
    # into the correct loop, we need to mock the 'os.path.isfile' check to force the
    # "corrupted file" check in the clean_old_jobs call.
    with patch("os.path.isfile", MagicMock(return_value=False)) as mock:
        local_cache.clean_old_jobs()
    # there should be only 1 dir in TMP_JID_DIR
    assert 1 == len(os.listdir(tmp_jid_dir))
    # top level dir should still be present
    assert os.path.exists(jid_dir) is True
    assert os.path.isdir(jid_dir) is True
    # while the 'jid' dir inside it should be gone
    assert os.path.exists(jid_dir_name) is False