22# pylint:disable=unused-argument
33# pylint:disable=redefined-outer-name
44
5- import json
65from collections import namedtuple
76from copy import deepcopy
87from pprint import pformat
9- from typing import Any , Type
8+ from typing import Any
109
1110import pytest
1211from models_library .service_settings_labels import (
@@ -84,7 +83,7 @@ def test_service_settings() -> None:
8483 ),
8584)
8685def test_service_settings_model_examples (
87- model_cls : Type [BaseModel ], model_cls_examples : dict [str , dict [str , Any ]]
86+ model_cls : type [BaseModel ], model_cls_examples : dict [str , dict [str , Any ]]
8887) -> None :
8988 for name , example in model_cls_examples .items ():
9089 print (name , ":" , pformat (example ))
@@ -97,7 +96,7 @@ def test_service_settings_model_examples(
9796 (SimcoreServiceLabels ,),
9897)
9998def test_correctly_detect_dynamic_sidecar_boot (
100- model_cls : Type [BaseModel ], model_cls_examples : dict [str , dict [str , Any ]]
99+ model_cls : type [BaseModel ], model_cls_examples : dict [str , dict [str , Any ]]
101100) -> None :
102101 for name , example in model_cls_examples .items ():
103102 print (name , ":" , pformat (example ))
@@ -128,7 +127,7 @@ def test_path_mappings_json_encoding() -> None:
128127 example = PathMappingsLabel .Config .schema_extra ["example" ]
129128 path_mappings = PathMappingsLabel .parse_obj (example )
130129 print (path_mappings )
131- assert json . loads (path_mappings .json ()) == example
130+ assert PathMappingsLabel . parse_raw (path_mappings .json ()) == path_mappings
132131
133132
134133def test_simcore_services_labels_compose_spec_null_container_http_entry_provided () -> None :
0 commit comments