diff --git a/tests/__init__.py b/tests/__init__.py index a977695..3939152 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1,4 @@ +from os import environ from pathlib import Path import pytest @@ -5,5 +6,7 @@ import pytest @pytest.fixture(autouse=True) def no_homedir_fixture(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: - monkeypatch.setattr("qbpm.paths.default_qbpm_application_dir", lambda: tmp_path) - monkeypatch.setattr("qbpm.paths.default_profile_dir", lambda: tmp_path) + environ["XDG_CONFIG_HOME"] = str(tmp_path) + environ["XDG_DATA_HOME"] = str(tmp_path) + monkeypatch.setattr("qbpm.paths.get_app_dir", lambda *_args, **_kwargs: tmp_path) + monkeypatch.setattr("qbpm.paths.Path.home", lambda: tmp_path)