fix: Lint fixes of last tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Tests for extraction API endpoints."""
|
||||
# ruff: noqa: PLR2004, E501
|
||||
|
||||
|
||||
import pytest
|
||||
@@ -11,7 +12,7 @@ class TestExtractionEndpoints:
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_extraction_success(
|
||||
self, test_client: AsyncClient, auth_cookies: dict[str, str],
|
||||
):
|
||||
) -> None:
|
||||
"""Test successful extraction creation."""
|
||||
# Set cookies on client instance to avoid deprecation warning
|
||||
test_client.cookies.update(auth_cookies)
|
||||
@@ -26,7 +27,7 @@ class TestExtractionEndpoints:
|
||||
assert response.status_code in [200, 400, 500] # Allow any non-auth error
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_extraction_unauthenticated(self, test_client: AsyncClient):
|
||||
async def test_create_extraction_unauthenticated(self, test_client: AsyncClient) -> None:
|
||||
"""Test extraction creation without authentication."""
|
||||
response = await test_client.post(
|
||||
"/api/v1/sounds/extract",
|
||||
@@ -37,7 +38,7 @@ class TestExtractionEndpoints:
|
||||
assert response.status_code == 401
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_extraction_unauthenticated(self, test_client: AsyncClient):
|
||||
async def test_get_extraction_unauthenticated(self, test_client: AsyncClient) -> None:
|
||||
"""Test extraction retrieval without authentication."""
|
||||
response = await test_client.get("/api/v1/sounds/extract/1")
|
||||
|
||||
@@ -47,7 +48,7 @@ class TestExtractionEndpoints:
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_processor_status_admin(
|
||||
self, test_client: AsyncClient, admin_cookies: dict[str, str],
|
||||
):
|
||||
) -> None:
|
||||
"""Test getting processor status as admin."""
|
||||
# Set cookies on client instance to avoid deprecation warning
|
||||
test_client.cookies.update(admin_cookies)
|
||||
@@ -63,7 +64,7 @@ class TestExtractionEndpoints:
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_processor_status_non_admin(
|
||||
self, test_client: AsyncClient, auth_cookies: dict[str, str],
|
||||
):
|
||||
) -> None:
|
||||
"""Test getting processor status as non-admin user."""
|
||||
# Set cookies on client instance to avoid deprecation warning
|
||||
test_client.cookies.update(auth_cookies)
|
||||
@@ -77,7 +78,7 @@ class TestExtractionEndpoints:
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_user_extractions(
|
||||
self, test_client: AsyncClient, auth_cookies: dict[str, str],
|
||||
):
|
||||
) -> None:
|
||||
"""Test getting user extractions."""
|
||||
# Set cookies on client instance to avoid deprecation warning
|
||||
test_client.cookies.update(auth_cookies)
|
||||
|
||||
Reference in New Issue
Block a user