mattermost/python-sdk
Nick Misasi 503ab08cbc test(08-01): add comprehensive tests for ServeHTTP streaming
Add tests for both Go and Python ServeHTTP implementations covering:
- Body chunking behavior (small, exact, multiple, large bodies)
- Context cancellation during body streaming
- Header conversion utilities
- HTTPRequest/HTTPResponseWriter helper classes
- Request body assembly from multiple chunks
- Error handling (500 for handler errors, 404 for missing handler)

Go tests:
- TestChunking_* for body chunking scenarios
- TestConvertHTTPHeaders for header conversion
- TestBuildRequestInit for request metadata building
- TestWriteResponseHeaders for response header writing
- TestContextCancellation_DuringBodyRead for cancellation

Python tests:
- TestHTTPRequest for request wrapper class
- TestHTTPResponseWriter for response writer class
- TestHeaderConversion for proto<->dict conversion
- TestServeHTTPServicer for gRPC servicer behavior
- TestChunkingBehavior for body assembly
- TestCancellation for request cancellation

Also:
- Fixed sendRequest to properly set body_complete flag on EOF
- Added ServeHTTP to HookName enum

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:31:30 -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(08-01): add comprehensive tests for ServeHTTP streaming 2026-01-19 14:31:30 -05:00
tests test(08-01): add comprehensive tests for ServeHTTP streaming 2026-01-19 14:31:30 -05:00
pyproject.toml feat(07-01): export hook system public API and add dependencies 2026-01-19 11:18:28 -05:00