mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Modernize code to Python 3.6+ (#1158)
* Compact dict and set building * Remove redundant parentheses * Simplify chained conditions * Change method name to lowercase * Use triple double quotes for docstrings Thanks, @eumiro!
This commit is contained in:
parent
90eba4c3ca
commit
a882d67962
19 changed files with 76 additions and 82 deletions
|
|
@ -789,7 +789,7 @@ def test_table_shape_object(app_client):
|
|||
} == response.json
|
||||
|
||||
|
||||
def test_table_shape_object_compound_primary_Key(app_client):
|
||||
def test_table_shape_object_compound_primary_key(app_client):
|
||||
response = app_client.get("/fixtures/compound_primary_key.json?_shape=object")
|
||||
assert {"a,b": {"pk1": "a", "pk2": "b", "content": "c"}} == response.json
|
||||
|
||||
|
|
@ -871,7 +871,7 @@ def test_validate_page_size(app_client, path, expected_error):
|
|||
|
||||
|
||||
def test_page_size_zero(app_client):
|
||||
"For _size=0 we return the counts, empty rows and no continuation token"
|
||||
"""For _size=0 we return the counts, empty rows and no continuation token"""
|
||||
response = app_client.get("/fixtures/no_primary_key.json?_size=0")
|
||||
assert 200 == response.status
|
||||
assert [] == response.json["rows"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue