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
Hello all! I'm currently working on implementing unit testing for a flask application, and we're using the flask-sqlalchemy version of SQLalchemy. I attempted to patch db.session but the return value is always the UnifiedMagicMock object, and queries and filters do not seem to work on it.
Has anybody found a good way to patch db.session using this library?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello all! I'm currently working on implementing unit testing for a flask application, and we're using the flask-sqlalchemy version of SQLalchemy. I attempted to patch db.session but the return value is always the UnifiedMagicMock object, and queries and filters do not seem to work on it.
Has anybody found a good way to patch db.session using this library?
Beta Was this translation helpful? Give feedback.
All reactions