def METHOD_NAME(monkeypatch, tmp_path):
    """Test if the configuration file is overwritten when it exists."""
    config_path = str(tmp_path) + "/tmp_config.yaml"
    monkeypatch.setattr(orion.core, "DEF_CONFIG_FILES_PATHS", [config_path])
    monkeypatch.setattr(
        builtins, "input", _mock_input(["y", "mongodb", "host", "name"])
    )
    dump = {"database": {"type": "allo2", "name": "allo2", "host": "allo2"}}
    with open(config_path, "w") as output:
        yaml.dump(dump, output)
    orion.core.cli.main(["db", "setup"])
    with open(config_path) as output:
        content = yaml.safe_load(output)
    assert content != dump