14
14
import json
15
15
from tempfile import NamedTemporaryFile
16
16
from pathlib import Path
17
- from typing import Any , TypeVar , NamedTuple , Final , cast , Dict , Type
17
+ from typing import Any , TypeVar , NamedTuple , Final , cast , Dict , Type , Set
18
18
from urllib .parse import urlparse
19
19
from parse import parse , with_pattern
20
20
@@ -67,7 +67,7 @@ class ServerPath(NamedTuple):
67
67
68
68
69
69
@pytest .fixture
70
- def all_server_paths (osparc_openapi_specs : Dict [str , Any ]) -> set [ServerPath ]:
70
+ def all_server_paths (osparc_openapi_specs : Dict [str , Any ]) -> Set [ServerPath ]:
71
71
server_paths = set ()
72
72
for path in osparc_openapi_specs ["paths" ]:
73
73
for method in osparc_openapi_specs ["paths" ][path ]:
@@ -89,7 +89,7 @@ def all_server_paths(osparc_openapi_specs: Dict[str, Any]) -> set[ServerPath]:
89
89
90
90
@pytest .fixture
91
91
def create_osparc_response_model (
92
- osparc_openapi_specs : dict [str , Any ],
92
+ osparc_openapi_specs : Dict [str , Any ],
93
93
) -> Callable [[Type [T ]], T ]:
94
94
def _create_model (model_type : type [T ]) -> T :
95
95
schemas = osparc_openapi_specs .get ("components" , {}).get ("schemas" , {})
@@ -105,8 +105,8 @@ def _create_model(model_type: type[T]) -> T:
105
105
@pytest .fixture
106
106
def create_server_mock (
107
107
mocker : MockerFixture ,
108
- osparc_openapi_specs : dict [str , Any ],
109
- all_server_paths : set [ServerPath ],
108
+ osparc_openapi_specs : Dict [str , Any ],
109
+ all_server_paths : Set [ServerPath ],
110
110
create_osparc_response_model : Callable [[str ], BaseModel ],
111
111
) -> Callable [[int ], None ]:
112
112
def _mock_server (_status : int ) -> None :
0 commit comments