Skip to content

Commit 2edcdda

Browse files
fix
1 parent 569efa5 commit 2edcdda

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14391,6 +14391,12 @@ components:
1439114391
- type: string
1439214392
const: ''
1439314393
title: Thumbnail
14394+
type:
14395+
$ref: '#/components/schemas/ProjectType'
14396+
templateType:
14397+
anyOf:
14398+
- $ref: '#/components/schemas/ProjectTemplateType'
14399+
- type: 'null'
1439414400
workbench:
1439514401
type: object
1439614402
title: Workbench
@@ -14482,6 +14488,8 @@ components:
1448214488
- name
1448314489
- description
1448414490
- thumbnail
14491+
- type
14492+
- templateType
1448514493
- workbench
1448614494
- prjOwner
1448714495
- accessRights
@@ -14581,6 +14589,12 @@ components:
1458114589
- type: string
1458214590
const: ''
1458314591
title: Thumbnail
14592+
type:
14593+
$ref: '#/components/schemas/ProjectType'
14594+
templateType:
14595+
anyOf:
14596+
- $ref: '#/components/schemas/ProjectTemplateType'
14597+
- type: 'null'
1458414598
workbench:
1458514599
type: object
1458614600
title: Workbench
@@ -14672,6 +14686,8 @@ components:
1467214686
- name
1467314687
- description
1467414688
- thumbnail
14689+
- type
14690+
- templateType
1467514691
- workbench
1467614692
- prjOwner
1467714693
- accessRights
@@ -14943,6 +14959,19 @@ components:
1494314959
- OPENED
1494414960
- MAINTAINING
1494514961
title: ProjectStatus
14962+
ProjectTemplateType:
14963+
type: string
14964+
enum:
14965+
- TEMPLATE
14966+
- TUTORIAL
14967+
- HYPERTOOL
14968+
title: ProjectTemplateType
14969+
ProjectType:
14970+
type: string
14971+
enum:
14972+
- TEMPLATE
14973+
- STANDARD
14974+
title: ProjectType
1494614975
ProjectTypeAPI:
1494714976
type: string
1494814977
enum:

services/web/server/tests/integration/01/test_garbage_collection.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import re
88
from collections.abc import AsyncIterable, Awaitable, Callable
99
from copy import deepcopy
10+
from enum import Enum
1011
from pathlib import Path
1112
from typing import Any, NamedTuple
1213
from unittest import mock
@@ -437,12 +438,16 @@ async def assert_user_not_in_db(
437438
assert user_db is None
438439

439440

441+
def enum_to_value(d):
442+
return {k: (v.value if isinstance(v, Enum) else v) for k, v in d.items()}
443+
444+
440445
async def assert_project_in_db(
441446
aiopg_engine: aiopg.sa.Engine, user_project: dict
442447
) -> None:
443448
project = await fetch_project_from_db(aiopg_engine, user_project)
444449
assert project
445-
project_as_dict = dict(project)
450+
project_as_dict = enum_to_value(dict(project))
446451

447452
assert_dicts_match_by_common_keys(project_as_dict, user_project)
448453

0 commit comments

Comments
 (0)