4 Commits

Author SHA1 Message Date
lizerk
dac0234007 Enforce repository-wide code quality 2026-09-07 19:43:48 +03:00
lizerk
beb4b8b86b refactor(departments): unify department feed and discussion flows 2026-04-14 16:14:52 +03:00
lizerk
f88d90230b refactor: clean architecture, align tests to current API contracts, all tests green [deploy-ready] 2026-03-30 04:27:18 +03:00
a9f38afd55 test(realtime): add comprehensive WebSocket consumer tests
- Add tests/realtime/ module with test suite for UserConsumer
- test_user_consumer.py: connection, auth, ping, chat management, typing
- test_routing.py: WebSocket URL routing validation
- test_integration.py: broadcast, notifications, multi-user scenarios
- conftest.py: fixtures for WebSocket testing (ws_communicator, test_chat)

Tests cover:
- Authentication (anonymous rejection, authenticated access)
- Chat subscription and management (open/close, access control)
- Ping/pong keepalive mechanism
- Typing indicators
- Message actions (send, mark_read)
- Integration with channel layer for broadcasts
- Multi-user WebSocket scenarios
2026-01-21 18:04:40 +03:00