diff --git a/.github/workflows/tests_ci.yml b/.github/workflows/tests_ci.yml index 83bd07a..3fe236b 100644 --- a/.github/workflows/tests_ci.yml +++ b/.github/workflows/tests_ci.yml @@ -26,6 +26,7 @@ jobs: run: | python -m pip install --upgrade pip pip install pytest + pip install . - name: Run unit tests run: ./run.sh unit-tests -s -vv diff --git a/tests/unit_tests/common/test_authorization.py b/tests/unit_tests/common/test_authorization.py index 2014bc1..807a0ef 100644 --- a/tests/unit_tests/common/test_authorization.py +++ b/tests/unit_tests/common/test_authorization.py @@ -1,11 +1,12 @@ """Tests for the authorization header extractor.""" import os -import sys -from fastapi import HTTPException import random import string +import sys + import pytest +from fastapi import HTTPException # Add root folder (parent) to sys.path sys.path.append( @@ -14,14 +15,14 @@ sys.path.append( ) ) -from gateway.common.config_manager import GatewayConfig -from gateway.common.request_context import RequestContext from gateway.common.authorization import ( + API_KEYS_SEPARATOR, + INVARIANT_AUTHORIZATION_HEADER, INVARIANT_GUARDRAIL_SERVICE_AUTHORIZATION_HEADER, extract_authorization_from_headers, - INVARIANT_AUTHORIZATION_HEADER, - API_KEYS_SEPARATOR, ) +from gateway.common.config_manager import GatewayConfig +from gateway.common.request_context import RequestContext @pytest.mark.parametrize("push_to_explorer", [True, False])