Commit Graph

10 Commits

Author SHA1 Message Date
Michael Recachinas bd5e297aa9 Default environ (#2047)
* Add init to FlaskClient

This addresses #1467. The init in the subclass
can now take in `environ_base`, which will then get
passed to `make_test_environ_builder` and to
`EnvironBuilder` via keyword args.

This should provide the default environment capability
on `app.test_client()` init.

* Add kwarg `environ_base` to `make_test_environ_builder` call

This change now passes `environ_base` from either
`kwargs` in `FlaskClient.open` or `FlaskClient.environ_base`
if passed into the init.

* Fix assignment reference typo

* Add default `environ_base` to `FlaskClient.__init__`

* Set default kwargs for `environ_base` in `FlaskClient.open`

* Remove specific environ_base kwarg since its in kwargs

* Add docstring to FlaskClient detailing environ_base

* Document app.test_client default environ in CHANGES

* Re-word environ_base changes in FlaskClient docstring

* Add client.environ_base tests

* Mention preset default environ in `app.test_client`

* Add versionchanged directive to docstring in FlaskClient
2016-10-12 08:54:24 +02:00
Reuven 4dc2ef19ea Use pytest.raises() instead of try/catch with asser 0
This is somehow more readable, and enable using the features of pytest's ExeptionInfo (such as errisinstance).
2016-03-04 13:30:40 +02:00
Parkayun 33534bb4a9 Happy New Year 2015 2015-01-02 11:35:00 +09:00
Markus Unterwaditzer c6795eb626 Remove useless unittest imports 2014-09-21 16:47:38 +02:00
Markus Unterwaditzer f8a778deae Kill classes in test_testing 2014-09-11 22:09:52 +02:00
Markus Unterwaditzer af4cb0ff2b Remove flask superclass 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer af41dbe0c4 Remove useless classes 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer 5da2c00419 Rewrite assertion methods 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer 8fa5e32d9a Tests pass now. 2014-09-11 22:09:50 +02:00
Markus Unterwaditzer 961db8ad72 Made tests recognizable 2014-09-11 22:09:50 +02:00