bober-bbq-bot/.gitignore
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

21 lines
532 B
Text

.env
# webapp/.env holds only build-time branding (no secrets) and is committed
# with the current defaults so Vite's %VAR% HTML replacement always has a
# value to substitute; a per-client override goes in webapp/.env.local
# instead (higher precedence, never touches the tracked defaults).
!webapp/.env
webapp/.env.local
__pycache__/
*.pyc
instance/*.db
instance/*.sqlite
instance/tmp_imports/
backups/
bober_bbq/static/uploads/*
!bober_bbq/static/uploads/.gitkeep
webapp/node_modules/
webapp/dist/
*.log
.vscode/
.pytest_cache/