Skip to content

Commit

Permalink
fix(AsyncConnector): replace urllib.parse.urljoin by posixpath.join
Browse files Browse the repository at this point in the history
  • Loading branch information
squioc committed Oct 30, 2024
1 parent 2650972 commit 291a55e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sekoia_automation/aio/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from contextlib import asynccontextmanager
from datetime import datetime
from pathlib import Path
from urllib.parse import urljoin
from posixpath import join as urljoin

from aiohttp import ClientSession
from aiolimiter import AsyncLimiter
Expand Down
3 changes: 2 additions & 1 deletion tests/aio/test_connector.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Test async connector."""

from unittest.mock import Mock, patch
from urllib.parse import urljoin
from posixpath import join as urljoin

import pytest
from aiolimiter import AsyncLimiter
Expand Down Expand Up @@ -222,6 +222,7 @@ async def test_async_connector_raise_error(
[
('http://intake.fake.url/', 'http://intake.fake.url/batch'),
('http://fake.url/intake/', 'http://fake.url/intake/batch'),
('http://fake.url/intake', 'http://fake.url/intake/batch'),
]
)
def test_async_connector_batchapi_url(storage, mocked_trigger_logs, base_url: str, expected_batchapi_url: str):
Expand Down

0 comments on commit 291a55e

Please sign in to comment.