jarus / flask-testing

Unittest extensions for Flask
http://pythonhosted.org/Flask-Testing/
Other
501 stars 110 forks source link

Let Flask manage its own request contexts #108

Closed jcomo closed 7 years ago

jcomo commented 7 years ago

Don't manage the context stack in the test setup / teardown. Instead, let Flask handle it. This fixes the issue where global and request context was being reused on subsequent test client requests within the same test case.

I'm a bit concerned that there are some people relying on the fact that the context exists in the setup method for things like attaching global context. While its not a good practice, I wouldn't want to break others test suites with this change.

Fixes #105

jeanphix commented 7 years ago

:+1: