# pylint: disable=redefined-outer-name # pylint: disable=unused-argument import json import pytest from selfprivacy_api.utils import get_domain @pytest.fixture def domain_file(mocker, datadir): mocker.patch("selfprivacy_api.utils.DOMAIN_FILE", datadir / "domain") return datadir def test_wrong_auth(wrong_auth_client): response = wrong_auth_client.get("/system/pythonVersion") assert response.status_code == 401 def test_get_domain(authorized_client, domain_file): assert get_domain() == "test-domain.tld"