Reorganize and improve tests
Put under the functional directory all tests that require access to the database. There is a "session" fixture in that directory that is automatically invoked for each tests. It rollbacks any transaction after the test to leave the database clean. Other tests should go under the unit directory. Inspired from: - https://stackoverflow.com/a/38626139 - http://alexmic.net/flask-sqlalchemy-pytest/
Showing
- conftest.py 1 addition, 80 deletionsconftest.py
- tests/functional/conftest.py 121 additions, 0 deletionstests/functional/conftest.py
- tests/functional/test_api.py 46 additions, 20 deletionstests/functional/test_api.py
- tests/functional/test_web.py 2 additions, 2 deletionstests/functional/test_web.py
tests/functional/conftest.py
0 → 100644
Please register or sign in to comment