I am trying to test an endpoint in flask and I need to "refresh" the DB after some commits.
The idea I had was something like : db=SQLAlchemy() db.session.begin_nested() db.session.add(Obj) db.session.commit() # some code where last commit is important db.session.add(Obj2) db.session.commit() # some other code where last commit is important db.session.rollback() But it doesn't work unless I have a single commit. Can you help me please :) -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/d77d4621-8f0a-47fd-8e79-ca3de3a4b5edn%40googlegroups.com.