test(api): gated live Ollama smoke (--run-live) + env docs
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
19
api/tests/test_live_smoke.py
Normal file
19
api/tests/test_live_smoke.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
import app.narrate as narrate
|
||||
|
||||
VALID = json.loads((Path(__file__).parent / "fixtures" / "canon_log_valid.json").read_text())
|
||||
|
||||
|
||||
@pytest.mark.live
|
||||
def test_narrator_returns_real_prose():
|
||||
"""Hits the real Ollama (OLLAMA_BASE_URL). Proves the wire end-to-end:
|
||||
prompt assembly → model → non-empty prose. Not asserted: tag content
|
||||
(nondeterministic). Run with: pytest --run-live
|
||||
"""
|
||||
text = narrate.run(VALID)
|
||||
assert isinstance(text, str)
|
||||
assert len(text.strip()) > 40 # real prose, not a blip
|
||||
Reference in New Issue
Block a user