| 123456789101112131415161718192021222324252627 |
- """§1 健康检查 — GET /api/health"""
- import pytest
- import requests
- from conftest import MOBILE_BASE, PC_BASE
- pytestmark = pytest.mark.integration
- def test_pc_health(require_pc_server):
- r = requests.get(f"{require_pc_server}/health", timeout=5)
- assert r.status_code == 200
- body = r.json()
- assert body["status"] == "ok"
- assert body["platform"] == "pc"
- assert "qiwei" in body["modules"]
- assert "staff" in body["modules"]
- def test_mobile_health():
- try:
- r = requests.get(f"{MOBILE_BASE}/health", timeout=3)
- except requests.RequestException:
- pytest.skip("Mobile 服务未启动 (3201)")
- assert r.status_code == 200
|