Refactor tests for improved consistency and readability
- Updated test cases in `test_auth_endpoints.py` to ensure consistent formatting and style. - Enhanced `test_socket_endpoints.py` with consistent parameter formatting and improved readability. - Cleaned up `conftest.py` by ensuring consistent parameter formatting in fixtures. - Added comprehensive tests for API token dependencies in `test_api_token_dependencies.py`. - Refactored `test_auth_service.py` to maintain consistent parameter formatting. - Cleaned up `test_oauth_service.py` by removing unnecessary imports. - Improved `test_socket_service.py` with consistent formatting and readability. - Enhanced `test_cookies.py` by ensuring consistent formatting and readability. - Introduced new tests for token utilities in `test_token_utils.py` to validate token generation and expiration logic.
This commit is contained in:
@@ -104,9 +104,8 @@ class SocketManager:
|
||||
await self.sio.emit(event, data, room=room_id)
|
||||
logger.debug(f"Sent {event} to user {user_id} in room {room_id}")
|
||||
return True
|
||||
else:
|
||||
logger.warning(f"User {user_id} not found in any room")
|
||||
return False
|
||||
logger.warning(f"User {user_id} not found in any room")
|
||||
return False
|
||||
|
||||
async def broadcast_to_all(self, event: str, data: dict):
|
||||
"""Broadcast a message to all connected users."""
|
||||
|
||||
Reference in New Issue
Block a user