Skip to content

Commit ba26018

Browse files
committed
fixes fixture
1 parent a8e87a6 commit ba26018

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

services/catalog/src/simcore_service_catalog/repository/services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ async def get_latest_release(self, key: str) -> ServiceMetaDataDBGet | None:
164164
services_latest = create_select_latest_services_query().alias("services_latest")
165165

166166
query = (
167-
sa.select(SERVICES_META_DATA_COLS)
167+
sa.select(*SERVICES_META_DATA_COLS)
168168
.select_from(
169169
services_latest.join(
170170
services_meta_data,

services/catalog/tests/unit/with_dbs/conftest.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,23 +467,25 @@ def create_director_list_services_from() -> (
467467
):
468468
"""Convenience function to merge outputs of
469469
- `create_fake_service_data` callable with those of
470-
- `expected_director_list_services` fixture
470+
- `expected_director_rest_api_list_services` fixture
471471
472-
to produce a new expected_director_list_services
472+
to produce a new expected_director_rest_api_list_services
473473
"""
474474

475475
class _Loader(ServiceMetaDataPublished):
476476
model_config = ConfigDict(extra="ignore", populate_by_name=True)
477477

478478
def _(
479-
expected_director_list_services: list[dict[str, Any]],
479+
expected_director_rest_api_list_services: list[dict[str, Any]],
480480
fake_services_data: list,
481481
):
482482
return [
483483
jsonable_encoder(
484484
_Loader.model_validate(
485485
{
486-
**next(itertools.cycle(expected_director_list_services)),
486+
**next(
487+
itertools.cycle(expected_director_rest_api_list_services)
488+
),
487489
**data[0], # service, **access_rights = data
488490
}
489491
),

services/catalog/tests/unit/with_dbs/test_api_rpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ def fake_data_for_services(
8787

8888

8989
@pytest.fixture
90-
def expected_director_list_services(
91-
expected_director_list_services: list[dict[str, Any]],
90+
def expected_director_rest_api_list_services(
91+
expected_director_rest_api_list_services: list[dict[str, Any]],
9292
fake_data_for_services: list,
9393
create_director_list_services_from: Callable,
9494
) -> list[dict[str, Any]]:
9595
# OVERRIDES: Changes the values returned by the mocked_director_service_api
9696

9797
return create_director_list_services_from(
98-
expected_director_list_services, fake_data_for_services
98+
expected_director_rest_api_list_services, fake_data_for_services
9999
)
100100

101101

services/catalog/tests/unit/with_dbs/test_service_services.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ def fake_services_data(
7272

7373

7474
@pytest.fixture
75-
def expected_director_list_services(
76-
expected_director_list_services: list[dict[str, Any]],
75+
def expected_director_rest_api_list_services(
76+
expected_director_rest_api_list_services: list[dict[str, Any]],
7777
fake_services_data: list,
7878
create_director_list_services_from: Callable,
7979
) -> list[dict[str, Any]]:
8080
# OVERRIDES: Changes the values returned by the mocked_director_service_api
8181

8282
return create_director_list_services_from(
83-
expected_director_list_services, fake_services_data
83+
expected_director_rest_api_list_services, fake_services_data
8484
)
8585

8686

0 commit comments

Comments
 (0)