Skip to content

Commit

Permalink
forgotten things
Browse files Browse the repository at this point in the history
  • Loading branch information
vdusek committed Sep 24, 2024
1 parent 456b10c commit 5332743
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/crawlee/http_clients/curl_impersonate.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def crawl(
try:
response = await client.request(
url=request.url,
method=str(request.method.upper()), # type: ignore
method=request.method.upper(), # type: ignore # curl-cffi requires uppercase method
headers=request.headers,
params=request.query_params,
data=request.payload,
Expand Down Expand Up @@ -162,7 +162,7 @@ async def send_request(
try:
response = await client.request(
url=url,
method=method.upper(), # type: ignore
method=method.upper(), # type: ignore # curl-cffi requires uppercase method
headers=headers,
params=query_params,
data=payload,
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/_utils/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_normalize_url(url: str, expected_output: str, *, keep_url_fragment: boo


@pytest.mark.parametrize(
('url', 'method', 'data', 'keep_url_fragment', 'use_extended_unique_key', 'expected_output'),
('url', 'method', 'payload', 'keep_url_fragment', 'use_extended_unique_key', 'expected_output'),
[
('http://example.com', 'GET', None, False, False, 'http://example.com'),
('http://example.com', 'POST', None, False, False, 'http://example.com'),
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_normalize_url(url: str, expected_output: str, *, keep_url_fragment: boo
def test_compute_unique_key(
url: str,
method: HttpMethod,
data: HttpPayload,
payload: HttpPayload,
*,
keep_url_fragment: bool,
use_extended_unique_key: bool,
Expand All @@ -116,7 +116,7 @@ def test_compute_unique_key(
output = compute_unique_key(
url,
method,
data,
payload,
keep_url_fragment=keep_url_fragment,
use_extended_unique_key=use_extended_unique_key,
)
Expand Down

0 comments on commit 5332743

Please sign in to comment.