chore: import upstream snapshot with attribution
Ruff Format Check / Ruff Format & Lint (push) Failing after 7m39s
Deploy VitePress site to Pages / build (push) Failing after 9m11s
Deploy VitePress site to Pages / Deploy (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:32:26 +08:00
commit 1443d3fdf9
732 changed files with 196602 additions and 0 deletions
@@ -0,0 +1,22 @@
"""
Integration tests for settings router endpoints.
"""
from __future__ import annotations
import pytest
pytestmark = [pytest.mark.asyncio, pytest.mark.integration]
async def test_reranker_list_requires_admin(test_client, standard_user):
public_response = await test_client.get("/api/settings/rerankers")
assert public_response.status_code == 404
forbidden_response = await test_client.get("/api/settings/rerankers", headers=standard_user["headers"])
assert forbidden_response.status_code == 404
async def test_admin_can_list_rerankers(test_client, admin_headers):
response = await test_client.get("/api/settings/rerankers", headers=admin_headers)
assert response.status_code == 404, response.text