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.
16 lines
398 B
Python
16 lines
398 B
Python
from types import SimpleNamespace
|
|
|
|
import pytest
|
|
|
|
from config.services.unfold import environment_callback
|
|
|
|
|
|
pytestmark = pytest.mark.unit
|
|
|
|
|
|
def test_admin_environment_badge(settings):
|
|
settings.DEBUG = True
|
|
assert environment_callback(SimpleNamespace()) == ["Development", "warning"]
|
|
settings.DEBUG = False
|
|
assert environment_callback(SimpleNamespace()) == ["Production", "success"]
|