This prevents these warnings to pop when running the unit tests:
LegacyAPIWarning: The Query.get() method is considered legacy as of the 1.x series of SQLAlchemy and becomes a legacy construct in 2.0. The method is now available as Session.get() (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
grant_user = User.query.get(int(user_id))
Also, the documentation use more framework-generic examples (User.query.get becomes User.get)
This prevents these warnings to pop when running the unit tests:
Also, the documentation use more framework-generic examples (
User.query.get
becomesUser.get
)