Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove xfail tests when new httpx is released #1005

Closed
simonw opened this issue Oct 9, 2020 · 3 comments
Closed

Remove xfail tests when new httpx is released #1005

simonw opened this issue Oct 9, 2020 · 3 comments
Labels
blocked Awaiting something else to happen first tests
Milestone

Comments

@simonw
Copy link
Owner

simonw commented Oct 9, 2020

My httpx pull request adding raw_path support was just merged: encode/httpx#1357 - but it's not in a release yet.

I'm going to mark these tests as xfail so I can land this change - I'll remove that once an httpx release comes out that I can use to get the tests passing.

Originally posted by @simonw in #1000 (comment)

@simonw simonw added blocked Awaiting something else to happen first tests labels Oct 9, 2020
simonw added a commit that referenced this issue Oct 9, 2020
Closes #943

* Datasette now requires httpx>=0.15
* Support OPTIONS without 500, closes #1001
* Added internals tests for datasette.client methods
* Datasette's own test mechanism now uses httpx to simulate requests
* Tests simulate HTTP 1.1 now
* Added base_url in a bunch more places
* Mark some tests as xfail - will remove that when new httpx release ships: #1005
@simonw simonw added this to the Datasette 1.0 milestone Oct 9, 2020
@simonw
Copy link
Owner Author

simonw commented Oct 10, 2020

@pytest.mark.xfail
def test_row_strange_table_name_with_url_hash(app_client_with_hash):
response = app_client_with_hash.get(
"/fixtures/table%2Fwith%2Fslashes.csv/3", allow_redirects=False
)

@pytest.mark.xfail
@pytest.mark.parametrize(
"path,expected_classes",
[
("/", ["index"]),
("/fixtures", ["db", "db-fixtures"]),
("/fixtures?sql=select+1", ["query", "db-fixtures"]),
(
"/fixtures/simple_primary_key",
["table", "db-fixtures", "table-simple_primary_key"],
),
(
"/fixtures/neighborhood_search",
["query", "db-fixtures", "query-neighborhood_search"],
),
(
"/fixtures/table%2Fwith%2Fslashes.csv",
["table", "db-fixtures", "table-tablewithslashescsv-fa7563"],
),
(
"/fixtures/simple_primary_key/1",
["row", "db-fixtures", "table-simple_primary_key"],
),
],
)
def test_css_classes_on_body(app_client, path, expected_classes):

datasette/tests/test_api.py

Lines 1190 to 1194 in 8f97b9b

@pytest.mark.xfail
def test_row_strange_table_name(app_client):
response = app_client.get(
"/fixtures/table%2Fwith%2Fslashes.csv/3.json?_shape=objects"
)

datasette/tests/test_api.py

Lines 742 to 746 in 8f97b9b

@pytest.mark.xfail
def test_table_with_slashes_in_name(app_client):
response = app_client.get(
"/fixtures/table%2Fwith%2Fslashes.csv?_shape=objects&_format=json"
)

@simonw
Copy link
Owner Author

simonw commented Dec 17, 2020

Tracking ticket for the next HTTPX release is encode/httpx#1403

@simonw
Copy link
Owner Author

simonw commented Feb 28, 2021

@simonw simonw closed this as completed Feb 28, 2021
simonw added a commit that referenced this issue Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Awaiting something else to happen first tests
Projects
None yet
Development

No branches or pull requests

1 participant