Skip to content

chore(deps): update dependency pytest to ~=8.4.0 #414

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

Merged
merged 3 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dev = [
"pytest-cov~=6.1.0",
"pytest-only~=2.1.0",
"pytest-xdist~=3.7.0",
"pytest~=8.3.0",
"pytest~=8.4.0",
"redbaron~=0.9.0",
"respx~=0.22.0",
"ruff~=0.11.0",
Expand Down
9 changes: 5 additions & 4 deletions tests/unit/test_client_errors.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
from collections.abc import Generator

import httpx
import pytest
import respx
from respx import MockRouter

from apify_client._errors import ApifyApiError
from apify_client._http_client import HTTPClient, HTTPClientAsync
Expand All @@ -16,13 +16,14 @@
}


@respx.mock
@pytest.fixture(autouse=True)
def mocked_response(respx_mock: MockRouter) -> None:
def mocked_response() -> Generator[respx.MockRouter]:
response_content = json.dumps(
{'error': {'message': _EXPECTED_MESSAGE, 'type': _EXPECTED_TYPE, 'data': _EXPECTED_DATA}}
)
respx_mock.get(_TEST_URL).mock(return_value=httpx.Response(400, content=response_content))
with respx.mock() as respx_mock:
respx_mock.get(_TEST_URL).mock(return_value=httpx.Response(400, content=response_content))
yield respx_mock


def test_client_apify_api_error_with_data() -> None:
Expand Down
66 changes: 38 additions & 28 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading