Skip to content

Commit fd60790

Browse files
committed
@sanderegg review: rm session scope
1 parent 4e7954f commit fd60790

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

api/specs/web-server/_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def as_query(model_class: type[BaseModel]) -> type[BaseModel]:
5858
"title": field_info.title,
5959
"description": field_info.description,
6060
"metadata": field_info.metadata,
61-
"json_schema_extra": field_info.json_schema_extra or {},
61+
"json_schema_extra": field_info.json_schema_extra,
6262
}
6363

6464
annotation = _replace_basemodel_in_annotation(

packages/pytest-simcore/src/pytest_simcore/openapi_specs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Entrypoint(NamedTuple):
2727
path: str
2828

2929

30-
@pytest.fixture
30+
@pytest.fixture(scope="session")
3131
def openapi_specs_path() -> Path:
3232
# NOTE: cannot be defined as a session scope because it is designed to be overriden
3333
pytest.fail(reason="Must be overriden in caller test suite")
@@ -53,7 +53,7 @@ def _load(file: Path, base_uri: str = "") -> dict:
5353
return data
5454

5555

56-
@pytest.fixture
56+
@pytest.fixture(scope="session")
5757
def openapi_specs(openapi_specs_path: Path) -> dict[str, Any]:
5858
assert openapi_specs_path.is_file()
5959
openapi: dict[str, Any] = _load(
@@ -62,7 +62,7 @@ def openapi_specs(openapi_specs_path: Path) -> dict[str, Any]:
6262
return deepcopy(openapi)
6363

6464

65-
@pytest.fixture
65+
@pytest.fixture(scope="session")
6666
def openapi_specs_entrypoints(
6767
openapi_specs: dict,
6868
) -> set[Entrypoint]:

services/web/server/tests/unit/with_dbs/03/test__openapi_specs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from simcore_service_webserver.rest._utils import get_openapi_specs_path
1919

2020

21-
@pytest.fixture
21+
@pytest.fixture(scope="session")
2222
def openapi_specs_path(api_version_prefix: str) -> Path:
2323
# overrides pytest_simcore.openapi_specs.app_openapi_specs_path fixture
2424
return get_openapi_specs_path(api_version_prefix)

0 commit comments

Comments
 (0)