igor_nadein 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

6 lines
128 B
Python

# tests/realtime/__init__.py
"""
Тесты для realtime приложения.
WebSocket тесты для UserConsumer.
"""