def test_get_egrc_config_uses_xdg_dir_default_if_both_present():
    """
    The XDG config should win over the home directory.
    """
    expected = 'mock config from default position'

    _assert_about_get_egrc_config(
        cli_path=None,
        cli_config_exists=False,
        winning_config_path=os.path.join('path', 'to', 'xdg_home', 'eg',
                                         'egrc_expanded'),
        home_config_exists=True,
        expected_config=expected,
        xdg_dir_variable=os.path.join('path', 'to', 'xdg_home'),
        xdg_config_exists=True,
    )

    The XDG config should win over the home directory.
    
test/config_test.py