sanic/tests
Ashley Sommer 30e6a310f1 Pausable response streams (#1179)
* This commit adds handlers for the asyncio/uvloop protocol callbacks for pause_writing and resume_writing.
These are needed for the correct functioning of built-in tcp flow-control provided by uvloop and asyncio.
This is somewhat of a breaking change, because the `write` function in user streaming callbacks now must be `await`ed.
This is necessary because it is possible now that the http protocol may be paused, and any calls to write may need to wait on an async event to be called to become unpaused.

Updated examples and tests to reflect this change.

This change does not apply to websocket connections. A change to websocket connections may be required to match this change.

* Fix a couple of PEP8 errors caused by previous rebase.

* update docs

add await syntax to response.write in response-streaming docs.

* remove commented out code from a test file
2018-08-18 18:12:13 -07:00
..
certs initial commit 2017-03-03 11:44:50 -05:00
performance Make golang performance test return JSON instead of string 2016-12-24 10:28:34 +01:00
static Add content_type flag to Sanic.static (#1267) 2018-07-20 22:31:15 -07:00
test_bad_request.py Use app decorator instead of run arguments for before_start 2017-02-11 14:30:17 +00:00
test_blueprints.py Add content_type flag to Sanic.static (#1267) 2018-07-20 22:31:15 -07:00
test_config.py test for env var prefix 2017-09-05 10:58:48 +02:00
test_cookies.py Fix response ci header (#1244) 2018-07-11 01:44:21 -07:00
test_create_task.py try to inject the app in add_task method 2017-12-27 01:06:43 -08:00
test_custom_protocol.py rework testing 2017-02-14 14:51:20 -05:00
test_dynamic_routes.py rework testing 2017-02-14 14:51:20 -05:00
test_exceptions_handler.py Comment: F821 undefined name is done on purpose 2017-07-26 12:44:30 +02:00
test_exceptions.py double quotes in unauthorized exception per rfc7230 2017-12-21 18:05:05 -08:00
test_keep_alive_timeout.py Pin aiohttp <= 3.2.1 in requirements-dev.txt (fixes errors for new contributors checking out the code and setting up a dev environment) 2018-08-16 15:00:23 +10:00
test_logging.py Boost test speed by pytest-xdist 2018-01-03 18:52:25 +09:00
test_middleware.py Revert files those fixed for flake problems. 2017-12-26 23:35:54 +03:30
test_multiprocessing.py fix hang build 2018-03-15 22:06:58 -07:00
test_named_routes.py use name to define route name for different methods on same url 2017-08-22 14:02:38 +08:00
test_payload_too_large.py Merge pull request #602 from jkbbwr/fix/env-install 2017-03-31 10:42:21 -07:00
test_redirect.py Sanitize the URL before redirecting (#1260) 2018-07-12 21:31:33 -07:00
test_request_data.py Revert files those fixed for flake problems. 2017-12-26 23:35:54 +03:30
test_request_stream.py Pausable response streams (#1179) 2018-08-18 18:12:13 -07:00
test_request_timeout.py Pin aiohttp <= 3.2.1 in requirements-dev.txt (fixes errors for new contributors checking out the code and setting up a dev environment) 2018-08-16 15:00:23 +10:00
test_requests.py fix hang build 2018-03-15 21:28:52 -07:00
test_response_timeout.py Add a test for the graceful CancelledError handling. The user app should _never_ see a CancelledError bubble up, nor should they be able to catch it, because the response is already sent at that point. 2018-08-06 15:02:12 +10:00
test_response.py Pausable response streams (#1179) 2018-08-18 18:12:13 -07:00
test_routes.py add UUID support (#1241) 2018-06-09 01:16:17 -07:00
test_server_events.py fix hang build 2018-03-15 21:28:52 -07:00
test_signal_handlers.py fix hang build 2018-03-15 21:28:52 -07:00
test_static.py Add content_type flag to Sanic.static (#1267) 2018-07-20 22:31:15 -07:00
test_url_building.py fix hang build 2018-03-15 21:28:52 -07:00
test_url_for_static.py use url_for for url building for static files 2017-09-06 19:17:52 +08:00
test_utf8.py rework testing 2017-02-14 14:51:20 -05:00
test_vhosts.py allow default vhost 2017-02-20 16:52:36 -08:00
test_views.py is_request_stream for CompositionView and HTTPMethodView 2017-05-09 01:04:03 +09:00
test_worker.py py37 (#1256) 2018-07-03 22:07:08 -07:00