Files
Hulumath-Web/backend/common/test_release_surface.py
T
Jacky 6c9f475ba5
CI / test (pull_request) Successful in 3m58s
PR合并自动部署 / release-check (pull_request) Successful in 13s
PR合并自动部署 / deploy (pull_request) Successful in 16s
release: prepare Hulumath v1.2.0
2026-08-10 01:23:30 +08:00

26 lines
666 B
Python

import pytest
from django.conf import settings
@pytest.mark.django_db
def test_health_包含当前发布版本(client):
response = client.get("/health/")
assert response.status_code == 200
assert response.json() == {
"status": "ok",
"database": "ok",
"version": settings.APP_VERSION,
}
def test_home_展示公众号入口与版本(client):
response = client.get("/")
content = response.content.decode()
assert response.status_code == 200
assert "公众号" in content
assert "葫芦数学" in content
assert f"Hulumath v{settings.APP_VERSION}" in content
assert 'href="weixin://"' in content