Skip to content

Commit

Permalink
basic test for this specific regression
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Aug 15, 2024
1 parent 6738a32 commit 4cf1b18
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_internals_datasette.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,25 @@ async def test_get_permission(ds_client):
# And test KeyError
with pytest.raises(KeyError):
ds.get_permission("missing-permission")


@pytest.mark.asyncio
async def test_apply_metadata_json():
ds = Datasette(
memory=True,
metadata={
"databases": {
"legislators": {
"tables": {"offices": {"summary": "office address or sumtin"}},
"queries": {
"millenntial_represetatives": {
"summary": "Social media accounts for current legislators"
}
},
}
}
},
)
await ds.invoke_startup()
assert (await ds.client.get("/")).status_code == 200
# print(root)

0 comments on commit 4cf1b18

Please sign in to comment.