refactor: Improve code readability by formatting query parameters in user endpoints and enhancing error handling in sound playback
This commit is contained in:
@@ -204,7 +204,8 @@ class TestAdminUserEndpoints:
|
||||
) -> None:
|
||||
"""Test listing users as non-admin user."""
|
||||
with patch(
|
||||
"app.core.dependencies.get_current_active_user", return_value=regular_user,
|
||||
"app.core.dependencies.get_current_active_user",
|
||||
return_value=regular_user,
|
||||
):
|
||||
response = await client.get("/api/v1/admin/users/")
|
||||
|
||||
@@ -296,7 +297,8 @@ class TestAdminUserEndpoints:
|
||||
) as mock_get_by_id,
|
||||
patch("app.repositories.user.UserRepository.update") as mock_update,
|
||||
patch(
|
||||
"app.repositories.plan.PlanRepository.get_by_id", return_value=test_plan,
|
||||
"app.repositories.plan.PlanRepository.get_by_id",
|
||||
return_value=test_plan,
|
||||
),
|
||||
):
|
||||
mock_user = type(
|
||||
|
||||
Reference in New Issue
Block a user