diff --git a/sekoia_automation/aio/connector.py b/sekoia_automation/aio/connector.py index ca9220e..19d9091 100644 --- a/sekoia_automation/aio/connector.py +++ b/sekoia_automation/aio/connector.py @@ -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 diff --git a/tests/aio/test_connector.py b/tests/aio/test_connector.py index 6b409b9..28fc70b 100644 --- a/tests/aio/test_connector.py +++ b/tests/aio/test_connector.py @@ -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 @@ -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):