mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Upgrade pytest to 3.6.0
https://github.com/pytest-dev/pytest/issues/1875 made it impossible to declare a function as a fixture multiple times, which we were doing across different modules. The fix was to move our @pytest.fixture calls into decorators in the tests/fixtures.py module.
This commit is contained in:
parent
16398641d9
commit
969771770f
5 changed files with 15 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from .fixtures import (
|
||||
from .fixtures import ( # noqa
|
||||
app_client,
|
||||
app_client_shorter_time_limit,
|
||||
app_client_returend_rows_matches_page_size,
|
||||
app_client_returned_rows_matches_page_size,
|
||||
generate_compound_rows,
|
||||
generate_sortable_rows,
|
||||
METADATA,
|
||||
|
|
@ -9,10 +9,6 @@ from .fixtures import (
|
|||
import pytest
|
||||
import urllib
|
||||
|
||||
pytest.fixture(scope='session')(app_client)
|
||||
pytest.fixture(scope='session')(app_client_shorter_time_limit)
|
||||
pytest.fixture(scope='session')(app_client_returend_rows_matches_page_size)
|
||||
|
||||
|
||||
def test_homepage(app_client):
|
||||
_, response = app_client.get('/.json')
|
||||
|
|
@ -936,11 +932,11 @@ def test_config_json(app_client):
|
|||
} == response.json
|
||||
|
||||
|
||||
def test_page_size_matching_max_returned_rows(app_client_returend_rows_matches_page_size):
|
||||
def test_page_size_matching_max_returned_rows(app_client_returned_rows_matches_page_size):
|
||||
fetched = []
|
||||
path = '/test_tables/no_primary_key.json'
|
||||
while path:
|
||||
response = app_client_returend_rows_matches_page_size.get(
|
||||
response = app_client_returned_rows_matches_page_size.get(
|
||||
path, gather_request=False
|
||||
)
|
||||
fetched.extend(response.json['rows'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue