Files
AstraBox/tests/sqlite_collection_conformance_test.py
Colton Qi f8db994652 AstraBox 0.1.0
The open-source, self-hosted alternative to Claude Managed Agents: run
Claude Code, Codex, Hermes, DeepSeek Harness and Pi as managed Agents on
your own infrastructure, with conversations that start and resume in
seconds.
2026-09-22 13:24:05 -07:00

25 lines
956 B
Python

"""The default SQLite backend, held to the collection contract.
Binds :class:`astrabox.testing.collection_conformance.CollectionContractSuite`
(the reusable suite a persistence plugin runs against ITS implementation) to the
in-tree ``AsyncCollection`` — so the reference implementation is proven against
the same invariants the seam promises plugin authors
(see ``astrabox/seams/repository.py``, Tier A).
"""
from __future__ import annotations
import pytest
from astrabox.persistence.repository.sqlite.collection import AsyncCollection
from astrabox.testing.collection_conformance import CollectionContractSuite
class TestSqliteCollectionContract(CollectionContractSuite):
@pytest.fixture(autouse=True)
def _bind_tmp_db(self, tmp_path) -> None:
self._db_url = f"sqlite+aiosqlite:///{tmp_path}/conformance.sqlite"
async def make_collection(self, name: str) -> AsyncCollection:
return AsyncCollection(name, self._db_url)