mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Template slot family of plugin hooks - top_homepage() and others
New plugin hooks: top_homepage top_database top_table top_row top_query top_canned_query New datasette.utils.make_slot_function() Closes #1191
This commit is contained in:
parent
7a5adb592a
commit
c3caf36af7
14 changed files with 324 additions and 7 deletions
|
|
@ -41,7 +41,9 @@ def plugin_hooks_content():
|
|||
"plugin", [name for name in dir(app.pm.hook) if not name.startswith("_")]
|
||||
)
|
||||
def test_plugin_hooks_are_documented(plugin, plugin_hooks_content):
|
||||
headings = get_headings(plugin_hooks_content, "-")
|
||||
headings = set()
|
||||
headings.update(get_headings(plugin_hooks_content, "-"))
|
||||
headings.update(get_headings(plugin_hooks_content, "~"))
|
||||
assert plugin in headings
|
||||
hook_caller = getattr(app.pm.hook, plugin)
|
||||
arg_names = [a for a in hook_caller.spec.argnames if a != "__multicall__"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue