aomarket-bot

Standalone Anarchy Online market-tracking bot

View the Project on GitHub zznathans/aomarket-bot

tests

Layout

Running

pip install -e ".[dev]"
docker compose up -d postgres   # or any reachable Postgres
pytest

asyncio_mode = "auto" is set in pyproject.toml, so async test functions don’t need @pytest.mark.asyncio.

Postgres-dependent tests

Anything using the db_session/api_client fixtures needs a real Postgres reachable at TEST_DATABASE_URL (defaults to postgresql+asyncpg://aomarket:aomarket@localhost:55432/aomarket_test — deliberately a separate database from docker-compose.yml’s default aomarket dev database, since these fixtures drop and recreate every table on each test). tests/conftest.py’s requires_postgres marker auto-skips those tests when nothing is reachable at that URL, so a plain pytest run without a database up still passes (skipping rather than failing) — bring up Postgres first if you want that coverage locally.