From bfd6fe1be8adadccd7de8975d81ed37d7681aca2 Mon Sep 17 00:00:00 2001 From: christian Date: Mon, 22 Jan 2024 15:01:43 +0100 Subject: [PATCH] =?UTF-8?q?use=20galaxykit=20instead=20of=20requests=20lib?= =?UTF-8?q?rary=20so=20that=20configuration=20is=20ta=E2=80=A6=20(#2040)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use galaxykit instead of requests library so that configuration is taken into account No-Issue --- galaxy_ng/tests/integration/api/test_api_base.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/galaxy_ng/tests/integration/api/test_api_base.py b/galaxy_ng/tests/integration/api/test_api_base.py index a34f5a4313..c12e4dfe58 100644 --- a/galaxy_ng/tests/integration/api/test_api_base.py +++ b/galaxy_ng/tests/integration/api/test_api_base.py @@ -1,19 +1,17 @@ import pytest -import requests from ..utils import get_client @pytest.mark.min_hub_version("4.6dev") @pytest.mark.deployment_standalone -def test_galaxy_api_root_standalone_no_auth_access(ansible_config): +def test_galaxy_api_root_standalone_no_auth_access(galaxy_client): """Test galaxy API root.""" - config = ansible_config("basic_user") - api_root = config["url"] - + gc = galaxy_client("basic_user") + del gc.headers["Authorization"] # verify api root works without authentication - response = requests.get(f"{api_root}").json() + response = gc.get("") assert "v3" in response["available_versions"] assert "pulp-v3" in response["available_versions"]