From 9e36fc4ccea5033e63f390c10362b707769a18b6 Mon Sep 17 00:00:00 2001 From: Samweli Date: Thu, 18 Apr 2024 03:23:13 +0300 Subject: [PATCH] remove underscore character in API auth test header names --- test/mock/stac_api_auth_server_app.py | 2 +- test/test_stac_api_client_auth.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/mock/stac_api_auth_server_app.py b/test/mock/stac_api_auth_server_app.py index 86478b0..f3aa03f 100644 --- a/test/mock/stac_api_auth_server_app.py +++ b/test/mock/stac_api_auth_server_app.py @@ -21,7 +21,7 @@ def catalog(): @app.route("/collections") def collections(): headers = request.headers - auth = headers.get("API_HEADER_KEY") + auth = headers.get("APIHeaderKey") if auth == 'test_api_header_key': collections = DATA_PATH / "collections.json" with collections.open() as fl: diff --git a/test/test_stac_api_client_auth.py b/test/test_stac_api_client_auth.py index 14615c1..2526917 100644 --- a/test/test_stac_api_client_auth.py +++ b/test/test_stac_api_client_auth.py @@ -55,7 +55,7 @@ def test_auth_collections_fetch(self): cfg_id = self.set_auth_method( "STAC_API_AUTH_TEST", "APIHeader", - {"API_HEADER_KEY": "test_api_header_key"} + {"APIHeaderKey": "test_api_header_key"} ) api_client = Client( @@ -78,7 +78,7 @@ def test_auth_collections_fetch(self): cfg_id = self.set_auth_method( "STAC_API_AUTH_TEST", "APIHeader", - {"API_HEADER_KEY": "unauthorized_api_header_key"} + {"APIHeaderKey": "unauthorized_api_header_key"} ) api_client = Client(