Commit graph

12 commits

Author SHA1 Message Date
Rene A. Zelaya
cb2c8a7b88 Bundling 'test_greenlet_context_copying' functions into a new class in tests/test_reqctx.py. 2017-05-23 16:45:11 -07:00
Christian Stade-Schuldt
2158fe3e12 DRYing up the test suite using pytest fixtures (#2306)
* add fixtures to conftest.py

* use fixtures in test_appctx.py

* use fixtures in test_blueprints.py

* use fixtures in test_depreciations.py

* use fixtures in test_regressions.py

* use fixtures in test_reqctx.py

* use fixtures in test_templating.py

* use fixtures in test_user_error_handler.py

* use fixtures in test_views.py

* use fixtures in test_basics.py

* use fixtures in test_helpers.py

* use fixtures in test_testing.py

* update conftest.py

* make docstrings  PEP-257 compliant

* cleanup

* switch dictonary format

* use pytest parameterization for test_json_as_unicode
2017-05-23 15:18:39 -07:00
David Lord
e7bc408877 ensure error while opening session pops context
errors will be handled by the app error handlers
closes #1538, closes #1528
2017-04-22 13:57:04 -07:00
Reuven
98581ec6d6 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
Martijn Pieters
35a1bc2f4a Switch away from using None as default value for the exception when tearing down a context.
When an exception has been handled when using the request / app context in a with statement, `sys.exc_info()` will still contain the exception information even though it has been handled already. The `__exit__` methods pass in `None` for the exception value in that case, which needs to be distinguisable from the default value for the `exc` parameter. Use a dedicated singleton sentinel value instead.
2015-03-23 15:17:19 +00:00
Parkayun
e05771ff60 Happy New Year 2015 2015-01-02 11:35:00 +09:00
Markus Unterwaditzer
93001352c6 Remove useless unittest imports 2014-09-21 16:47:38 +02:00
Markus Unterwaditzer
1d0b83690e Remove flask superclass 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
304913a878 Remove useless classes 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
879becff31 Rewrite assertion methods 2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
1c40e7ad49 Tests pass now. 2014-09-11 22:09:50 +02:00
Markus Unterwaditzer
2ea00e48ad Made tests recognizable 2014-09-11 22:09:50 +02:00
Renamed from tests/reqctx.py (Browse further)