-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Labels
Description
I keep on having to figure this out: if you use the https://pypi.org/project/pytest-httpx/ fixture to write tests against mocked external APIs, they will fail because that module will break Datasette's own datasette.client testing mechanism.
You can fix this using:
@pytest.fixture
def non_mocked_hosts():
return ["localhost"]See https://github.com/simonw/datasette-indieauth/blob/1.2/tests/test_indieauth.py
I can add this tip to the https://docs.datasette.io/en/stable/testing_plugins.html page.
Reactions are currently unavailable