-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Our keg.testing:ContextManager
is designed to cache the application instance as well as the app context. However, after reading the Flask docs on app context, it has become obvious that I'm using the app context wrong. Despite it's name, it's not intended to have the same life cycle as the app instance. It's intended to have a lifetime almost the same as the request context.
This is actually the underlying reason behind the bug I thought Flask-WTF had: pallets-eco/flask-wtf#301
It looks like some kind of pytest fixture support is what we really need in order to make the app instance available to our tests instead of relying on flask.current_app
.
Some good ideas here:
https://github.com/pytest-dev/pytest-flask
Metadata
Metadata
Assignees
Labels
No labels