baseline: 批次A-D 成果 + membership 半成品(测试红)

This commit is contained in:
agent
2026-09-11 23:11:35 +08:00
commit b3f3095d53
311 changed files with 40540 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
"""公开路径与中间件行为。"""
import pytest
from django.test import Client
@pytest.mark.django_db
def test_ping_public_no_auth():
"""ping 是公开的,不需要 token / 租户。"""
client = Client()
resp = client.get("/api/v1/ping/")
assert resp.status_code == 200
@pytest.mark.django_db
def test_admin_path_skips_tenant_check():
"""admin 路径不强制要求租户。"""
client = Client()
resp = client.get("/admin/")
assert resp.status_code in (200, 302)