Skip to content

Commit 9bd8349

Browse files
committed
fix fixture in api-server unit tests
1 parent 36fd97b commit 9bd8349

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

services/api-server/tests/unit/service/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from simcore_service_api_server._service_programs import ProgramService
2121
from simcore_service_api_server._service_solvers import SolverService
2222
from simcore_service_api_server._service_studies import StudyService
23+
from simcore_service_api_server.services_http.storage import StorageApi
2324
from simcore_service_api_server.services_http.webserver import AuthSession
2425
from simcore_service_api_server.services_rpc.catalog import CatalogService
2526
from simcore_service_api_server.services_rpc.director_v2 import DirectorV2Service
@@ -108,11 +109,20 @@ async def _create_project(project: ProjectCreateNew, **kwargs):
108109
return mock
109110

110111

112+
@pytest.fixture
113+
def storage_rest_client(
114+
mocker: MockerFixture,
115+
) -> StorageApi:
116+
mock = mocker.AsyncMock(spec=StorageApi)
117+
return mock
118+
119+
111120
@pytest.fixture
112121
def job_service(
113122
auth_session: AuthSession,
114123
director_v2_rpc_client: DirectorV2Service,
115124
storage_rpc_client: StorageService,
125+
storage_rest_client: StorageApi,
116126
wb_api_rpc_client: WbApiRpcClient,
117127
product_name: ProductName,
118128
user_id: UserID,
@@ -121,6 +131,7 @@ def job_service(
121131
_web_rest_client=auth_session,
122132
_web_rpc_client=wb_api_rpc_client,
123133
_storage_rpc_client=storage_rpc_client,
134+
_storage_rest_client=storage_rest_client,
124135
_directorv2_rpc_client=director_v2_rpc_client,
125136
user_id=user_id,
126137
product_name=product_name,

0 commit comments

Comments
 (0)