mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
render_cell(..., request) argument, closes #2007
This commit is contained in:
parent
e4ebef082d
commit
0b4a286914
7 changed files with 30 additions and 18 deletions
|
|
@ -187,7 +187,9 @@ async def test_hook_render_cell_link_from_json(ds_client):
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_hook_render_cell_demo(ds_client):
|
||||
response = await ds_client.get("/fixtures/simple_primary_key?id=4")
|
||||
response = await ds_client.get(
|
||||
"/fixtures/simple_primary_key?id=4&_render_cell_extra=1"
|
||||
)
|
||||
soup = Soup(response.text, "html.parser")
|
||||
td = soup.find("td", {"class": "col-content"})
|
||||
assert json.loads(td.string) == {
|
||||
|
|
@ -196,6 +198,7 @@ async def test_hook_render_cell_demo(ds_client):
|
|||
"table": "simple_primary_key",
|
||||
"database": "fixtures",
|
||||
"config": {"depth": "table", "special": "this-is-simple_primary_key"},
|
||||
"render_cell_extra": 1,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue