Open imaia opened 6 years ago
The docs at http://pythonhosted.org/Flask-Testing/ say that you need to manually drop the tables and remove the session.
Second, it’s usually a good idea to create and drop your tables with each test run, to ensure clean tests
Notice also that db.session.remove() is called at the end of each test, to ensure the SQLAlchemy session is properly removed and that a new session is started with each test run - this is a common “gotcha”.
It would be nice to have it crystal clear what flask-testing does and does not in docs. Does it integrate with sqlalchemy in any way beyond session removal? Does it drop tables between tests?