mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-07-05 02:17:51 +02:00
Fix broken unit tests.
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user