davidism · GitHub

Added a new class flask.testing.EnvironBuilder inheriting from werkzeug.test.EnvironBuilder.

Logic from make_test_environ_builder() moved to the constructor of that class, and changed to simply instantiate the class, while issuing a DeprecationWarning.

I did explore making json_dumps() a regular method rather than a static method, to pick up app, but if anything was expecting to call EnvironBuilder.json_dumps() as a static method then this would break. Requires funky descriptor tricks to work both as a static method and an instance method under Python 2 and so didn't seem worth the code it would take.

closes #3207

Read the original on github.com ↗