Skip to content

Commit 29f67ff

Browse files
fix tests
1 parent ba3b868 commit 29f67ff

File tree

1 file changed

+8
-7
lines changed
  • services/api-server/src/simcore_service_api_server/services

1 file changed

+8
-7
lines changed

services/api-server/src/simcore_service_api_server/services/catalog.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from dataclasses import dataclass
66
from functools import partial
77
from operator import attrgetter
8+
from typing import Final
89

910
from fastapi import FastAPI, status
1011
from models_library.emails import LowerCaseEmailStr
@@ -68,11 +69,11 @@ def to_solver(self) -> Solver:
6869

6970
_exception_mapper = partial(service_exception_mapper, "Catalog")
7071

71-
_TRUNCATED_CATALOG_SERVICE_OUT_ADAPTER: TypeAdapter[
72-
TruncatedCatalogServiceOut
72+
TruncatedCatalogServiceOutAdapter: Final[
73+
TypeAdapter[TruncatedCatalogServiceOut]
7374
] = TypeAdapter(TruncatedCatalogServiceOut)
74-
_LIST_OF_TRUNCATED_CATALOG_SERVICE_OUT_ADAPTER: TypeAdapter[
75-
list[TruncatedCatalogServiceOut]
75+
TruncatedCatalogServiceOutListAdapter: Final[
76+
TypeAdapter[list[TruncatedCatalogServiceOut]]
7677
] = TypeAdapter(list[TruncatedCatalogServiceOut])
7778

7879

@@ -110,8 +111,8 @@ async def list_solvers(
110111
] = await asyncio.get_event_loop().run_in_executor(
111112
None,
112113
_parse_response,
113-
_LIST_OF_TRUNCATED_CATALOG_SERVICE_OUT_ADAPTER,
114-
response.text,
114+
TruncatedCatalogServiceOutListAdapter,
115+
response,
115116
)
116117
solvers = []
117118
for service in services:
@@ -152,7 +153,7 @@ async def get_service(
152153
service: (
153154
TruncatedCatalogServiceOut
154155
) = await asyncio.get_event_loop().run_in_executor(
155-
None, _parse_response, _TRUNCATED_CATALOG_SERVICE_OUT_ADAPTER, response.text
156+
None, _parse_response, TruncatedCatalogServiceOutAdapter, response
156157
)
157158
assert ( # nosec
158159
service.service_type == ServiceType.COMPUTATIONAL

0 commit comments

Comments
 (0)