mattermost/python-sdk
Nick Misasi 6392b981fe test(07-02): add tests for lifecycle and message hook semantics
- Add test_hooks_lifecycle.py with tests for:
  - Implemented RPC returning correct hook list
  - OnActivate success/failure propagation
  - OnDeactivate best-effort semantics
  - OnConfigurationChange error handling
- Add test_hooks_messages.py with tests for:
  - MessageWillBePosted allow/reject/modify/dismiss semantics
  - MessageWillBeUpdated with old/new post handling
  - Notification hooks (Posted/Updated/Deleted)
  - MessagesWillBeConsumed list filtering/modification
- Fix @hook decorator to preserve async handlers
  - Use separate async wrapper for coroutine functions
  - Enables proper async detection in hook runner

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 11:26:03 -05:00
..
scripts feat(06-02): add coverage audit script for RPC/method parity 2026-01-19 09:55:10 -05:00
src/mattermost_plugin test(07-02): add tests for lifecycle and message hook semantics 2026-01-19 11:26:03 -05:00
tests test(07-02): add tests for lifecycle and message hook semantics 2026-01-19 11:26:03 -05:00
pyproject.toml feat(07-01): export hook system public API and add dependencies 2026-01-19 11:18:28 -05:00