Refactor test files for improved readability and consistency
- Removed unnecessary blank lines and adjusted formatting in test files. - Ensured consistent use of commas in function calls and assertions across various test cases. - Updated import statements for better organization and clarity. - Enhanced mock setups in tests for better isolation and reliability. - Improved assertions to follow a consistent style for better readability.
This commit is contained in:
@@ -158,7 +158,7 @@ class TestSocketEndpoints:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_message_missing_parameters(
|
||||
self, authenticated_client: AsyncClient, authenticated_user: User
|
||||
self, authenticated_client: AsyncClient, authenticated_user: User,
|
||||
):
|
||||
"""Test sending message with missing parameters."""
|
||||
# Missing target_user_id
|
||||
@@ -177,7 +177,7 @@ class TestSocketEndpoints:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_broadcast_message_missing_parameters(
|
||||
self, authenticated_client: AsyncClient, authenticated_user: User
|
||||
self, authenticated_client: AsyncClient, authenticated_user: User,
|
||||
):
|
||||
"""Test broadcasting message with missing parameters."""
|
||||
response = await authenticated_client.post("/api/v1/socket/broadcast")
|
||||
@@ -185,7 +185,7 @@ class TestSocketEndpoints:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_message_invalid_user_id(
|
||||
self, authenticated_client: AsyncClient, authenticated_user: User
|
||||
self, authenticated_client: AsyncClient, authenticated_user: User,
|
||||
):
|
||||
"""Test sending message with invalid user ID."""
|
||||
response = await authenticated_client.post(
|
||||
|
||||
Reference in New Issue
Block a user