mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Include asyncio task information in /-/threads debug page
This commit is contained in:
parent
2039e78e58
commit
d6b6c9171f
5 changed files with 41 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ from .fixtures import ( # noqa
|
|||
)
|
||||
import json
|
||||
import pytest
|
||||
import sys
|
||||
import urllib
|
||||
|
||||
|
||||
|
|
@ -1229,6 +1230,14 @@ def test_metadata_json(app_client):
|
|||
assert METADATA == response.json
|
||||
|
||||
|
||||
def test_threads_json(app_client):
|
||||
response = app_client.get("/-/threads.json")
|
||||
expected_keys = {"threads", "num_threads"}
|
||||
if sys.version_info >= (3, 7, 0):
|
||||
expected_keys.update({"tasks", "num_tasks"})
|
||||
assert expected_keys == set(response.json.keys())
|
||||
|
||||
|
||||
def test_plugins_json(app_client):
|
||||
response = app_client.get("/-/plugins.json")
|
||||
assert [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue