mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Run black formatter
This commit is contained in:
parent
b5f41772ca
commit
60a38cee85
14 changed files with 222 additions and 80 deletions
|
|
@ -135,7 +135,9 @@ def test_not_allowed_methods():
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.xfail(reason="Canned queries not displayed due to view-query permission, refs #2510")
|
||||
@pytest.mark.xfail(
|
||||
reason="Canned queries not displayed due to view-query permission, refs #2510"
|
||||
)
|
||||
async def test_database_page(ds_client):
|
||||
response = await ds_client.get("/fixtures")
|
||||
soup = Soup(response.text, "html.parser")
|
||||
|
|
@ -264,7 +266,7 @@ def test_query_page_truncates():
|
|||
pytest.param(
|
||||
"/fixtures/neighborhood_search",
|
||||
["query", "db-fixtures", "query-neighborhood_search"],
|
||||
marks=pytest.mark.xfail(reason="Canned queries not accessible, refs #2510")
|
||||
marks=pytest.mark.xfail(reason="Canned queries not accessible, refs #2510"),
|
||||
),
|
||||
(
|
||||
"/fixtures/table~2Fwith~2Fslashes~2Ecsv",
|
||||
|
|
@ -597,7 +599,9 @@ async def test_404_content_type(ds_client):
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.xfail(reason="Canned queries not yet migrated to new permission system, refs #2510")
|
||||
@pytest.mark.xfail(
|
||||
reason="Canned queries not yet migrated to new permission system, refs #2510"
|
||||
)
|
||||
async def test_canned_query_default_title(ds_client):
|
||||
response = await ds_client.get("/fixtures/magic_parameters")
|
||||
assert response.status_code == 200
|
||||
|
|
@ -606,7 +610,9 @@ async def test_canned_query_default_title(ds_client):
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.xfail(reason="Canned queries not yet migrated to new permission system, refs #2510")
|
||||
@pytest.mark.xfail(
|
||||
reason="Canned queries not yet migrated to new permission system, refs #2510"
|
||||
)
|
||||
async def test_canned_query_with_custom_metadata(ds_client):
|
||||
response = await ds_client.get("/fixtures/neighborhood_search?text=town")
|
||||
assert response.status_code == 200
|
||||
|
|
@ -669,7 +675,9 @@ async def test_show_hide_sql_query(ds_client):
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.xfail(reason="Canned queries not yet migrated to new permission system, refs #2510")
|
||||
@pytest.mark.xfail(
|
||||
reason="Canned queries not yet migrated to new permission system, refs #2510"
|
||||
)
|
||||
async def test_canned_query_with_hide_has_no_hidden_sql(ds_client):
|
||||
# For a canned query the show/hide should NOT have a hidden SQL field
|
||||
# https://github.com/simonw/datasette/issues/1411
|
||||
|
|
@ -681,7 +689,9 @@ async def test_canned_query_with_hide_has_no_hidden_sql(ds_client):
|
|||
] == [(hidden["name"], hidden["value"]) for hidden in hiddens]
|
||||
|
||||
|
||||
@pytest.mark.xfail(reason="Canned queries not yet migrated to new permission system, refs #2510")
|
||||
@pytest.mark.xfail(
|
||||
reason="Canned queries not yet migrated to new permission system, refs #2510"
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
"hide_sql,querystring,expected_hidden,expected_show_hide_link,expected_show_hide_text",
|
||||
(
|
||||
|
|
@ -931,7 +941,9 @@ def test_base_url_affects_metadata_extra_css_urls(app_client_base_url_prefix):
|
|||
("/fixtures/magic_parameters", None),
|
||||
],
|
||||
)
|
||||
@pytest.mark.xfail(reason="Canned queries not yet migrated to new permission system, refs #2510")
|
||||
@pytest.mark.xfail(
|
||||
reason="Canned queries not yet migrated to new permission system, refs #2510"
|
||||
)
|
||||
async def test_edit_sql_link_on_canned_queries(ds_client, path, expected):
|
||||
response = await ds_client.get(path)
|
||||
assert response.status_code == 200
|
||||
|
|
@ -1037,7 +1049,7 @@ async def test_trace_correctly_escaped(ds_client):
|
|||
pytest.param(
|
||||
"/fixtures/neighborhood_search?text=town",
|
||||
"http://localhost/fixtures/neighborhood_search.json?text=town",
|
||||
marks=pytest.mark.xfail(reason="Canned queries not accessible, refs #2510")
|
||||
marks=pytest.mark.xfail(reason="Canned queries not accessible, refs #2510"),
|
||||
),
|
||||
# /-/ pages
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue