mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
extra_body_script module support, closes #1187
This commit is contained in:
parent
fa0c3777b8
commit
c38c42948c
5 changed files with 31 additions and 9 deletions
|
|
@ -288,7 +288,7 @@ def test_plugin_config_file(app_client):
|
|||
],
|
||||
)
|
||||
def test_hook_extra_body_script(app_client, path, expected_extra_body_script):
|
||||
r = re.compile(r"<script>var extra_body_script = (.*?);</script>")
|
||||
r = re.compile(r"<script type=\"module\">var extra_body_script = (.*?);</script>")
|
||||
json_data = r.search(app_client.get(path).text).group(1)
|
||||
actual_data = json.loads(json_data)
|
||||
assert expected_extra_body_script == actual_data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue