Fix broken unit tests.

This commit is contained in:
Hemang
2025-05-06 20:31:32 +05:30
committed by Hemang Sarkar
parent e64a977d87
commit dc9ac9c3c6
2 changed files with 8 additions and 6 deletions
+1
View File
@@ -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
@@ -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])