def METHOD_NAME(state_tree):
    with pytest.helpers.temp_file("Invalid.cer") as cert_file:
        with salt.utils.files.fopen(str(cert_file), "wb") as fh:
            fh.write(b"Invalid cert data")
        yield cert_file