gendesign/backend/tests
Light1YT 0247f13fb6
All checks were successful
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 1m35s
Deploy / build-worker (push) Successful in 2m49s
Deploy / deploy (push) Successful in 1m13s
test(rbac): test-mode bypass so api/v1 suite can authenticate (CI-rehab 1/3)
The whole backend api/v1 test suite hits `app` via TestClient mimo Caddy, so
rbac_guard (app/main.py) 401'd every authed request (no X-Authenticated-User)
— 112 tests red, the suite effectively dead (which is how #994's district 500
shipped uncaught). Add `settings.testing` (default False — prod RBAC untouched)
+ a strictly-gated bypass at the top of rbac_guard; tests/conftest.py enables it
(env TESTING=1 + settings.testing=True before app import).

Security: bypass fires ONLY when settings.testing is True, which is set NOWHERE
in prod (default False; only tests/conftest.py flips it). RBAC's 401/403 logic
stays covered by tests/test_rbac.py (its own middleware copy, ignores the flag).

Effect: 112 → 42 failed, 1590 → 1660 passed. Remaining 42 (+5 mv_layout env
errors) are stale-mock/assertion drift + env-required tests — fixed in CI-rehab
2/3. Foundation for a real Forgejo pytest gate (3/3).

Refs #944.
2026-06-03 18:29:20 +05:00
..
api fix(analyze): district KeyError 500 in #994 persist + revive by-bbox tests 2026-06-03 18:04:37 +05:00
integration test(infra): integration phantom column gate (#197) (#216) 2026-05-16 13:07:13 +00:00
scrapers feat(site-finder): live CBR key-rate scraper → macro_indicator (#945 PR B) (#964) 2026-06-02 19:05:57 +00:00
scripts feat(#978b): Source A + detrend in rate-sensitivity backtest (#1025) 2026-06-03 09:51:48 +00:00
services feat(exporters): Site Finder report PDF exporter (#989, 955-A3) (#1023) 2026-06-03 09:09:30 +00:00
smoke fix(parcels): _parse_floors handle int (post-migration #169) (#176) 2026-05-15 15:08:16 +03:00
sql chore(mv): regression test + sql rule for weighted AVG (#295) (#626) 2026-05-28 13:49:54 +00:00
workers feat(workers): supply-layers refresh task + weekly beat (#950 Step 5) (#1005) 2026-06-02 20:47:05 +00:00
__init__.py init 2026-04-25 13:45:19 +03:00
conftest.py test(rbac): test-mode bypass so api/v1 suite can authenticate (CI-rehab 1/3) 2026-06-03 18:29:20 +05:00
test_admin_weight_profiles.py feat(#114): seed 3 default weight presets + include_system API param 2026-05-16 22:49:56 +03:00
test_concepts_stub.py init 2026-04-25 13:45:19 +03:00
test_gate_verdict.py feat(#29,#232): wire cad_parcels.permitted_use in analyze + cad_zouit fallback (G2+G3) 2026-05-17 08:17:22 +03:00
test_health.py init 2026-04-25 13:45:19 +03:00
test_layout_signature.py feat(parcels): layout signature schemas + extractor (#113 PR A) (#193) 2026-05-16 07:52:34 +00:00
test_layout_tz_pdf.py feat(layouts): PDF ТЗ endpoint + BestLayoutsBlock UI (#113 PR D) (#199) 2026-05-16 09:53:05 +00:00
test_nspd_client.py fix(#231): address re-review blockers — per-instance semaphore + time_limit + test mocks 2026-05-17 10:13:34 +03:00
test_nspd_sync.py fix(#244): harvest_quarter — CAST CASE WHEN params (psycopg3 AmbiguousParameter) (#246) 2026-05-17 05:53:08 +00:00
test_ping.py feat(backend): add /api/v1/ping liveness endpoint (#634) 2026-05-29 15:53:29 +00:00
test_poi_score.py feat(sf-b6): GET /parcels/{cad}/poi-score — weighted top-7 (#333) 2026-05-17 21:11:25 +00:00
test_quarter_dump_lookup.py feat(site-finder): integrate nspd_quarter_dumps cache в analyze_parcel (#94 Sprint 1.1 FINAL) (#116) 2026-05-13 09:14:19 +03:00
test_rbac.py feat(rbac): pilot scope → только /trade-in/** (#587) 2026-05-26 07:40:44 +00:00
test_sentry_init.py feat(backend): sentry-sdk init для FastAPI + Celery (#204 backend) (#207) 2026-05-16 15:09:16 +00:00
test_velocity.py feat(obj-3): SF backend migrate to objective_lots ground truth (price 0.3% -> 81%) (#324) 2026-05-17 20:08:17 +00:00
test_weight_profiles.py feat(site-finder): weight profiles service — Pydantic + CRUD (#114 sub-PR 2/4) (#137) 2026-05-15 00:29:37 +03:00