Skip to content

Commit db7a935

Browse files
committed
fix test
1 parent 0c99cde commit db7a935

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/simcore-sdk/tests/unit/test_node_ports_common_storage_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import datetime
55
from collections.abc import AsyncIterable
6-
from typing import Final
6+
from typing import Any, Final
77

88
import pytest
99
from aiohttp import ClientResponseError, ClientSession
@@ -14,12 +14,14 @@
1414

1515
_ROUTE_ALWAYS_200_OK: Final[str] = "http://always-200-ok"
1616

17-
_MOCK_RESPONSE_BODY: Final[str] = "mock_body"
17+
_MOCK_RESPONSE_BODY: Final[dict[str, Any]] = {"data": "mock_body"}
1818

1919

2020
@pytest.fixture
2121
def mock_responses(aioresponses_mocker: aioresponses) -> None:
22-
aioresponses_mocker.get(_ROUTE_ALWAYS_200_OK, status=200, body=_MOCK_RESPONSE_BODY)
22+
aioresponses_mocker.get(
23+
_ROUTE_ALWAYS_200_OK, status=200, payload=_MOCK_RESPONSE_BODY
24+
)
2325

2426

2527
@pytest.fixture
@@ -46,7 +48,7 @@ async def test_retry_request_ok(mock_responses: None, session: ClientSession):
4648
session, "GET", _ROUTE_ALWAYS_200_OK, expected_status=200
4749
) as response:
4850
assert response.status == 200
49-
assert await response.text() == _MOCK_RESPONSE_BODY
51+
assert await response.json() == _MOCK_RESPONSE_BODY
5052

5153

5254
async def test_retry_request_unexpected_code(

0 commit comments

Comments
 (0)