fix: add starlette/httpx to dev deps, guard test_openai_compat imports #2
@@ -35,6 +35,8 @@ dev = [
|
||||
"pytest>=7.4",
|
||||
"mypy>=1.8",
|
||||
"ruff>=0.4",
|
||||
"starlette>=0.36",
|
||||
"httpx>=0.27",
|
||||
]
|
||||
all = ["fusionagi[openai,anthropic,local,gpu]"]
|
||||
|
||||
|
||||
@@ -1,20 +1,31 @@
|
||||
"""Tests for OpenAI-compatible API bridge."""
|
||||
"""Tests for OpenAI-compatible API bridge.
|
||||
|
||||
Requires the ``api`` or ``dev`` extra (starlette, httpx).
|
||||
Skipped gracefully when those packages are not installed.
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from starlette.testclient import TestClient
|
||||
|
||||
from fusionagi.adapters import StubAdapter
|
||||
from fusionagi.api.app import create_app
|
||||
from fusionagi.api.openai_compat.translators import (
|
||||
messages_to_prompt,
|
||||
pytest.importorskip("starlette", reason="starlette not installed (pip install fusionagi[dev])")
|
||||
pytest.importorskip("fastapi", reason="fastapi not installed (pip install fusionagi[api])")
|
||||
|
||||
from starlette.testclient import TestClient # noqa: E402
|
||||
|
||||
from fusionagi.adapters import StubAdapter # noqa: E402
|
||||
from fusionagi.api.app import create_app # noqa: E402
|
||||
from fusionagi.api.openai_compat.translators import ( # noqa: E402
|
||||
estimate_usage,
|
||||
final_response_to_openai,
|
||||
messages_to_prompt,
|
||||
)
|
||||
from fusionagi.schemas.witness import ( # noqa: E402
|
||||
AgreementMap,
|
||||
FinalResponse,
|
||||
TransparencyReport,
|
||||
)
|
||||
from fusionagi.schemas.witness import AgreementMap, FinalResponse, TransparencyReport
|
||||
|
||||
|
||||
# Stub adapter responses for Dvādaśa heads and Witness
|
||||
HEAD_OUTPUT = {
|
||||
|
||||
Reference in New Issue
Block a user