snipe/tests/test_tiers.py
pyr0ball eb05be0612
Some checks are pending
CI / API — lint + test (pull_request) Waiting to run
CI / Web — typecheck + test + build (pull_request) Waiting to run
feat: wire Forgejo Actions CI/CD workflows (#22)
- ci.yml: API lint (ruff F+I) + pytest, web vue-tsc + vitest + build
- mirror.yml: push to GitHub (CircuitForgeLLC) + Codeberg (CircuitForge) on main/tags
- release.yml: Docker build → Forgejo registry + release via API; GHCR deferred pending BSL policy (cf-agents#3)
- .cliff.toml: git-cliff changelog config for semver releases
- pyproject.toml: add [dev] extras (pytest, ruff), ruff config
- Fix 45 ruff violations across codebase (import sorting, unused vars, unused imports)
2026-04-06 00:00:28 -07:00

24 lines
785 B
Python

from app.tiers import can_use
def test_metadata_scoring_is_free():
assert can_use("metadata_trust_scoring", tier="free") is True
def test_photo_analysis_is_paid():
assert can_use("photo_analysis", tier="free") is False
assert can_use("photo_analysis", tier="paid") is True
def test_local_vision_unlocks_photo_analysis():
assert can_use("photo_analysis", tier="free", has_local_vision=True) is True
def test_byok_does_not_unlock_photo_analysis():
assert can_use("photo_analysis", tier="free", has_byok=True) is False
def test_saved_searches_are_free():
# Ungated: retention feature — friction cost outweighs gate value (see tiers.py)
assert can_use("saved_searches", tier="free") is True
assert can_use("saved_searches", tier="paid") is True