def METHOD_NAME(monkeypatch, mocker, tmp_path, with_keyring_creds):
    """Test that load_esgf_pyclient_config returns the default config."""
    monkeypatch.setattr(_esgf_pyclient, 'CONFIG_FILE',
                        tmp_path / 'non-existent.yml')
    credentials = CREDENTIALS if with_keyring_creds else {}
    mocker.patch.object(
        _esgf_pyclient,
        'get_keyring_credentials',
        autospec=True,
        return_value=credentials,
    )
    cfg = _esgf_pyclient.load_esgf_pyclient_config()
    expected = copy.deepcopy(DEFAULT_CONFIG)
    expected['logon'].update(credentials)
    assert cfg == expected