mirror of
https://github.com/ajurna/cbwebreader.git
synced 2026-11-02 18:46:53 +00:00
- Removed `flake8` and `flake8-annotations` from dependencies, replaced by `ruff` for linting. - Introduced cleaner type hinting and modern Python annotations (PEP 604 style) across multiple modules. - Moved archive processing to a dedicated helper (`comic.archives`) for improved maintainability. - Updated and simplified logic for archive file retrieval, directory cleaning, and user access validation. - Improved error handling and added support for user classification restrictions in API responses.
15 lines
509 B
Python
15 lines
509 B
Python
"""Tests for URL resolution that depends on settings."""
|
|
|
|
import pytest
|
|
from django.test import Client
|
|
|
|
|
|
@pytest.mark.parametrize('url', ['/swagger.json', '/swagger.yaml', '/swagger/', '/redoc/'])
|
|
def test_schema_urls_resolve(client: Client, url: str) -> None:
|
|
"""The schema URLs must match the renderer formats, which no longer include a dot.
|
|
|
|
cbreader/urls.py captures the format after the dot because
|
|
SWAGGER_USE_COMPAT_RENDERERS is False.
|
|
"""
|
|
assert client.get(url).status_code == 200
|