jarus/flask-testing — pull request #67 by svenstaro (2014-10-11 05:51:54+00:00)
Title: Give the live server a request context

This is essentially a convenience hack (which is very much in line with how the rest of flask-testing works) that creates a request context that we don't actually need. However, a request context in turn creates an app context which in turn makes our extensions work. As it is, the live server is essentially broken in all but the most trivial configurations.

It breaks flask-sqlalchemy as it is, due to: https://github.com/mitsuhiko/flask-sqlalchemy/blob/master/flask_sqlalchemy/__init__.py#L835

Tests work fine. I'm aware that we could do this with [app_context](http://flask.pocoo.org/docs/0.10/api/#flask.Flask.app_context) but frankly that would mean that users have to do more work on their side. The current method is costly but the cost pales compared to the rest of what a live testing server is used for anyway.

I'm confident this is a good change.