Files
template-workflow-document-…/tests/conftest.py
T
Adrian Lyjak 935ad538fb Fix index-contract API, add fake tests for parsing/invoice templates (#270)
- extract-reconcile-invoice: index_contract.py called files.get_file /
  files.read_file_content / files.upload_file (v1 SDK surface removed in
  v2), breaking every Upload Contract click. Switched to files.list +
  files.get + files.create.
- Added test_index_contract_workflow and test_metadata_workflow to
  exercise the full v2 surface (files.list, files.get, pipelines.upsert,
  pipelines.documents.upsert, configurations.retrieve).
- document-parsing and invoice-extraction had only placeholder tests —
  wired up llama-cloud-fake and added parametrized tests covering every
  tier/mode. invoice-extraction's test drives the HIL step.
- Bumped requires-python to >=3.12 on both (fake floor).
2026-04-24 16:52:40 -04:00

21 lines
448 B
Python

"""Pytest configuration: install the LlamaCloud fake server for all tests."""
import logging
import sys
import pytest
from llama_cloud_fake import FakeLlamaCloudServer
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.StreamHandler(sys.stdout)],
)
_fake = FakeLlamaCloudServer().install()
@pytest.fixture
def fake() -> FakeLlamaCloudServer:
return _fake