feat(api): standardize REST contracts and auth
This commit is contained in:
@@ -5,7 +5,7 @@ from app.api.v1.endpoints import leakage as leakage_endpoint
|
||||
|
||||
def _build_client() -> TestClient:
|
||||
app = FastAPI()
|
||||
app.include_router(leakage_endpoint.router, prefix="/api/v1/leakage")
|
||||
app.include_router(leakage_endpoint.router, prefix="/api/v1")
|
||||
app.dependency_overrides[leakage_endpoint.get_current_keycloak_username] = (
|
||||
lambda: "tester"
|
||||
)
|
||||
@@ -23,7 +23,7 @@ def test_identify_leakage_success(monkeypatch):
|
||||
)
|
||||
client = _build_client()
|
||||
response = client.post(
|
||||
"/api/v1/leakage/identify/",
|
||||
"/api/v1/leakage-identifications",
|
||||
json={
|
||||
"network": "demo",
|
||||
"scada_start": "2026-01-01T00:00:00+08:00",
|
||||
|
||||
Reference in New Issue
Block a user