mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Support nested JSON in metadata.json, closes #2403
This commit is contained in:
parent
1f3fb5f96b
commit
9028d7f805
2 changed files with 9 additions and 3 deletions
|
|
@ -183,13 +183,16 @@ async def test_apply_metadata_json():
|
|||
"legislators": {
|
||||
"tables": {"offices": {"summary": "office address or sumtin"}},
|
||||
"queries": {
|
||||
"millenntial_represetatives": {
|
||||
"millennial_representatives": {
|
||||
"summary": "Social media accounts for current legislators"
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
"weird_instance_value": {"nested": [1, 2, 3]},
|
||||
},
|
||||
)
|
||||
await ds.invoke_startup()
|
||||
assert (await ds.client.get("/")).status_code == 200
|
||||
value = (await ds.get_instance_metadata()).get("weird_instance_value")
|
||||
assert value == '{"nested": [1, 2, 3]}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue