You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 2 test_init_successful_connection tests in backend/app/tests/scripts/test_\*_pre_start.py are basically noops, due to misuses of MagicMock(return_value=True). The 2 unit tests would error out due to unknown attributes (called_once_with) when running bash scripts/test.sh under python 3.12+, which tightened up the MagicMock implementation.
PR would follow.
Reacted by Yurii Motov, Nemanja Mitic, Anh Trinh, Matt Cole, Alex Tarasov and berkaykrc
Activity
Fix broken unit tests fastapi#1780
Fix broken unit tests
✅ Fix incorrect mocking in unit tests (issue #1780) (#1781)
tiangolo commentedon Jan 22, 2026
Thanks for the PR! 🚀
✅ Fix incorrect mocking in unit tests (issue fastapi#1780) (fastapi#1781
✅ Fix incorrect mocking in unit tests (issue fastapi#1780) (fastapi#1781