Skip to content

Commit 72cf61c

Browse files
author
Andrei Neagu
committed
fixed tests
1 parent 95c8e94 commit 72cf61c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services/resource-usage-tracker/tests/unit/with_dbs/test_api_resource_tracker_service_runs__export.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# pylint:disable=too-many-arguments
55

66
import os
7-
from unittest.mock import Mock
7+
from unittest.mock import AsyncMock, Mock
88

99
import pytest
1010
import sqlalchemy as sa
@@ -29,16 +29,16 @@
2929

3030

3131
@pytest.fixture
32-
async def mocked_export(mocker: MockerFixture):
33-
mocker.patch(
32+
async def mocked_export(mocker: MockerFixture) -> AsyncMock:
33+
return mocker.patch(
3434
"simcore_service_resource_usage_tracker.services.service_runs.ResourceTrackerRepository.export_service_runs_table_to_s3",
3535
autospec=True,
3636
)
3737

3838

3939
@pytest.fixture
40-
async def mocked_presigned_link(mocker: MockerFixture):
41-
mocker.patch(
40+
async def mocked_presigned_link(mocker: MockerFixture) -> AsyncMock:
41+
return mocker.patch(
4242
"simcore_service_resource_usage_tracker.services.service_runs.SimcoreS3API.create_single_presigned_download_link",
4343
return_value=TypeAdapter(AnyUrl).validate_python("https://www.testing.com/"),
4444
)

0 commit comments

Comments
 (0)