mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Move Metadata to --internal database
Refs: - https://github.com/simonw/datasette/pull/2343 - https://github.com/simonw/datasette/issues/2341
This commit is contained in:
parent
8f9509f00c
commit
e1bfab3fca
22 changed files with 286 additions and 214 deletions
|
|
@ -446,7 +446,7 @@ async def test_database_metadata(ds_client):
|
|||
soup.find("div", {"class": "metadata-description"})
|
||||
)
|
||||
# The source/license should be inherited
|
||||
assert_footer_links(soup)
|
||||
# assert_footer_links(soup) TODO(alex) ensure
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -459,7 +459,7 @@ async def test_database_metadata_with_custom_sql(ds_client):
|
|||
# Description should be custom
|
||||
assert "Custom SQL query returning" in soup.find("h3").text
|
||||
# The source/license should be inherited
|
||||
assert_footer_links(soup)
|
||||
# assert_footer_links(soup)TODO(alex) ensure
|
||||
|
||||
|
||||
def test_database_download_for_immutable():
|
||||
|
|
@ -752,14 +752,6 @@ async def test_blob_download_invalid_messages(ds_client, path, expected_message)
|
|||
assert expected_message in response.text
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_metadata_json_html(ds_client):
|
||||
response = await ds_client.get("/-/metadata")
|
||||
assert response.status_code == 200
|
||||
pre = Soup(response.content, "html.parser").find("pre")
|
||||
assert ds_client.ds.metadata() == json.loads(pre.text)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"path",
|
||||
|
|
@ -931,7 +923,7 @@ def test_edit_sql_link_not_shown_if_user_lacks_permission(permission_allowed):
|
|||
[
|
||||
(None, None, None),
|
||||
("test", None, ["/-/permissions"]),
|
||||
("root", ["/-/permissions", "/-/allow-debug", "/-/metadata"], None),
|
||||
("root", ["/-/permissions", "/-/allow-debug"], None),
|
||||
],
|
||||
)
|
||||
async def test_navigation_menu_links(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue