File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
src/simcore_service_webserver/api/v0 Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 77import re
88from collections .abc import AsyncIterable , Awaitable , Callable
99from copy import deepcopy
10+ from enum import Enum
1011from pathlib import Path
1112from typing import Any , NamedTuple
1213from 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+
440445async 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
You can’t perform that action at this time.
0 commit comments