Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions autobot-slm-backend/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ def _stub(name: str) -> MagicMock:
]:
_stub(_m)

# ── python-multipart ─────────────────────────────────────────────────────────
# FastAPI's ensure_multipart_is_installed() is called when any route uses
# UploadFile or Form parameters. It checks for python_multipart.__version__
# at route-registration time (import time for the router module). Stub it
# so that code_source_test.py can import code_source.py without the package
# being installed in the dev environment. Issue: #3525
_pm_mod = types.ModuleType("python_multipart")
_pm_mod.__version__ = "9.9.99" # type: ignore[attr-defined] # high sentinel — immune to future FastAPI threshold bumps
sys.modules.setdefault("python_multipart", _pm_mod)

# ── user_management ───────────────────────────────────────────────────────────
for _m in [
"user_management",
Expand Down
Loading