bober-bbq-bot/requirements-dev.txt
byrsapty 8bba2873b5 Add repo-committed pytest test suite
Converts the ad-hoc scratch-script verification pattern used throughout
this session's development (temp SQLite DB + create_app() + monkeypatched
send_message/fiscalize_in_background/get_invoice_status, print-based
check() assertions) into a real, repo-committed pytest suite under tests/.

Covers: claim_order_paid() atomicity, cross-path payment race dedup
(webhook/checkout-poll/reconciliation all observing the same paid
invoice), fiscalization error alerting + cooldown, admin login
brute-force lockout, the insecure-defaults startup check, supplier-import
path-traversal protection, basic checkout smoke, and the supplier
restock -> stock/supplier-link bug fixed earlier this session.

Adds requirements-dev.txt (pytest only, keeping the existing
monkeypatch-only style rather than a new mocking framework), pytest.ini
so `pytest` runs from the repo root with no flags, and docs/TESTING.md
covering how to run it and what's explicitly not covered yet (the React
webapp, bot conversation flows beyond the checkout API, live
Checkbox/Monobank/Google Drive integrations).

38 tests, all passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 13:32:09 +03:00

9 lines
487 B
Text

# Dev/test-only dependencies, on top of requirements.txt.
#
# Deliberately just pytest: the existing ad-hoc verification scripts used
# throughout this project's development monkeypatched dependencies
# directly (module.function = fake) with a plain check(label, cond)
# helper, no mocking framework — the pytest test suite under tests/
# continues that style with stdlib unittest.mock (via pytest's own
# `monkeypatch` fixture), so nothing beyond pytest itself is needed.
pytest>=8.0