Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Docs: what flask-testing does and what it does not #114

Open
imaia opened this issue Sep 14, 2017 · 1 comment
Open

Improve Docs: what flask-testing does and what it does not #114

imaia opened this issue Sep 14, 2017 · 1 comment

Comments

@imaia
Copy link

imaia commented Sep 14, 2017

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?

@ghost
Copy link

ghost commented Oct 19, 2017

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”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant