661 B
661 B
Stage-code golden tests
These tests call the running FastAPI service and its configured FastGPT
workflow. Each conversation step asserts only the nextStageCode carried by
the SSE stage_code event.
Edit cases.json to add or update conversation cases:
{
"name": "example",
"clientMode": "browser_addon",
"steps": [
{
"text": "继续",
"expect": {
"stageCode": "browser_addon.1002"
}
}
]
}
Start the API, then run:
RUN_GOLDEN=1 \
GOLDEN_BASE_URL=http://127.0.0.1:8000 \
pytest -m golden_live test/golden -v
Without RUN_GOLDEN=1, the cases are skipped and do not make network calls.