Context
The spam detection logic in src/services/spam_checker.py has no tests yet. This is a great first contribution — no Telegram API knowledge needed.
What to do
- Create
tests/test_spam_checker.py
- Write tests for the heuristic scoring (not the AI parts):
- User with no username → score increases
- User with short name → score increases
- Bot user → high score
- Normal user → approved
- Message with spam patterns → detected
- Clean message → passes
Tips
- Mock the AI functions (they call external APIs)
- Use
pytest and pytest-asyncio
- Run with:
pytest tests/
Acceptance Criteria
Context
The spam detection logic in
src/services/spam_checker.pyhas no tests yet. This is a great first contribution — no Telegram API knowledge needed.What to do
tests/test_spam_checker.pyTips
pytestandpytest-asynciopytest tests/Acceptance Criteria
pytest