Files
plane-gptproto-integration/ai-agent/tests/conftest.py
T
carlandCursor 0136c15274 Initial commit: Plane 自部署与 gptproto AI 集成
包含本地/远程部署脚本、AI Agent 服务、Dashboard 与 QA 验证。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 11:37:41 +08:00

25 lines
689 B
Python

import os
import pytest
import pytest_asyncio
from httpx import ASGITransport, AsyncClient
@pytest.fixture(autouse=True)
def _env(monkeypatch):
monkeypatch.setenv("GPTPROTO_BASE_URL", "https://gptproto.com/v1")
monkeypatch.setenv("GPTPROTO_API_KEY", "test-key")
monkeypatch.setenv("GPTPROTO_MODEL", "claude-sonnet-4-6")
monkeypatch.setenv("PLANE_API_BASE", "http://api:8000")
monkeypatch.setenv("PLANE_API_TOKEN", "test-plane-token")
yield
@pytest_asyncio.fixture
async def client():
from ai_agent.main import app
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://testserver") as ac:
yield ac