Files
guilan-ace-backend/apps/blog/tests/unit/test_seed_helpers.py
Amirhossein Khalili ff99130938 test: migrate backend suites to pytest with module coverage gate
Split backend tests into unit and integration suites, add isolated fixtures and coverage enforcement, and update CI and test documentation. Cover current authentication, content, notification, payment, media, and admin flows; fix behaviors revealed by the new tests. Validate both suites and the per-module gate against local PostgreSQL.
2026-09-26 16:50:29 +03:30

16 lines
650 B
Python

import pytest
from apps.blog.management.commands.seed_blog_categories import console_safe as category_console_safe
from apps.blog.management.commands.seed_blog_mock_data import make_image_bytes, make_markdown
from apps.blog.management.commands.seed_blog_tags import console_safe as tag_console_safe
pytestmark = pytest.mark.unit
def test_seed_helpers_produce_readable_markdown_and_image():
assert "# Workshop" in make_markdown("Workshop")
assert make_image_bytes("Banner", 120, 80, (20, 30, 40)).startswith(b"\xff\xd8")
assert category_console_safe("دسته") == "دسته"
assert tag_console_safe("برچسب") == "برچسب"