baseline: 批次A-D 成果 + membership 半成品(测试红)
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user