Rollback Many Transactions between tests in Flask
问题 My tests take a long time to run and I am trying to rollback transactions between tests instead of dropping and creating the tables between tests. The issues is that in some tests I do multiple commits. EDIT: How do I rollback transactions between tests so that tests will run faster Here is the Base class used for testing. import unittest from app import create_app from app.core import db from test_client import TestClient, TestResponse class TestBase(unittest.TestCase): def setUp(self): self