datasette/tests
Russ Garrett cf406c0754 New plugin hook: register_output_renderer hook (#441)
Thanks @russss!

* Add register_output_renderer hook

This changeset refactors out the JSON renderer and then adds a hook and
dispatcher system to allow custom output renderers to be registered.

The CSV output renderer is untouched because supporting streaming
renderers through this system would be significantly more complex, and
probably not worthwhile.

We can't simply allow hooks to be called at request time because we need
a list of supported file extensions when the request is being routed in
order to resolve ambiguous database/table names. So, renderers need to
be registered at startup.

I've tried to make this API independent of Sanic's request/response
objects so that this can remain stable during the switch to ASGI. I'm
using dictionaries to keep it simple and to make adding additional
options in the future easy.

Fixes #440
2019-05-01 16:01:56 -07:00
..
__init__.py Broke up test_app into test_api and test_html 2017-12-15 04:08:24 -08:00
fixtures.py ?_fts_table= and ?_fts_pk= arguments, closes #428 2019-04-11 21:21:17 -07:00
test_api.py Test for ?_trace=1, refs #435 2019-04-21 10:46:56 -07:00
test_csv.py New ?tags__arraycontains=tag lookup against JSON fields 2019-04-10 08:27:52 -07:00
test_docs.py Documentation for filters, plus new documentation unit test 2019-04-15 15:41:11 -07:00
test_filters.py Support multiple filters of the same type 2019-04-15 16:44:17 -07:00
test_html.py ?_where= parameter on table views, closes #429 2019-04-12 18:37:22 -07:00
test_inspect.py Import pysqlite3 if available, closes #360 (#361) 2018-08-15 17:58:56 -07:00
test_plugins.py Fix json.loads in Python 3.5 2018-08-28 17:55:30 +01:00
test_publish_heroku.py Fix for test failure with Click 7.0 2019-03-14 22:00:13 -07:00
test_publish_now.py Unit tests for publish now/heroku - closes #348 2018-07-25 22:45:47 -07:00
test_utils.py New plugin hook: register_output_renderer hook (#441) 2019-05-01 16:01:56 -07:00