"""平台公开端点测试(不鉴权):/api/v1/platform/flags 等。"""
from __future__ import annotations

from fastapi.testclient import TestClient


def test_flags_default_comparing_ad_enabled(client: TestClient) -> None:
    """空配置库下,/flags 返回 comparing_ad_enabled 的默认值 True;不需要鉴权。"""
    r = client.get("/api/v1/platform/flags")
    assert r.status_code == 200, r.text
    body = r.json()
    assert "comparing_ad_enabled" in body
    assert body["comparing_ad_enabled"] is True
