File tree 3 files changed +5
-9
lines changed
services/web/server/tests/unit/isolated
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ def mocked_login_required(mocker: MockerFixture):
251
251
)
252
252
253
253
mocker .patch (
254
- "simcore_service_webserver.login.decorators.get_product_name" ,
254
+ "simcore_service_webserver.login.decorators.products_web. get_product_name" ,
255
255
spec = True ,
256
256
return_value = "osparc" ,
257
257
)
Original file line number Diff line number Diff line change @@ -34,17 +34,13 @@ def test_product_examples(
34
34
35
35
def test_product_to_static ():
36
36
37
- product = Product .model_validate (
38
- Product .model_config ["json_schema_extra" ]["examples" ][0 ]
39
- )
37
+ product = Product .model_validate (Product .model_json_schema ()["examples" ][0 ])
40
38
assert product .to_statics () == {
41
39
"displayName" : "o²S²PARC" ,
42
40
"supportEmail" :
"[email protected] " ,
43
41
}
44
42
45
- product = Product .model_validate (
46
- Product .model_config ["json_schema_extra" ]["examples" ][2 ]
47
- )
43
+ product = Product .model_validate (Product .model_json_schema ()["examples" ][2 ])
48
44
49
45
assert product .to_statics () == {
50
46
"displayName" : "o²S²PARC FOO" ,
@@ -82,7 +78,7 @@ def test_product_to_static():
82
78
83
79
84
80
def test_product_host_regex_with_spaces ():
85
- data = Product .model_config [ "json_schema_extra" ] ["examples" ][2 ]
81
+ data = Product .model_json_schema () ["examples" ][2 ]
86
82
87
83
# with leading and trailing spaces and uppercase (tests anystr_strip_whitespace )
88
84
data [
"support_email" ]
= " [email protected] "
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ async def test_frontend_config(
59
59
assert client .app
60
60
# avoids having to start database etc...
61
61
mocker .patch (
62
- "simcore_service_webserver.rest._handlers.get_product_name" ,
62
+ "simcore_service_webserver.rest._handlers.products_web. get_product_name" ,
63
63
spec = True ,
64
64
return_value = "osparc" ,
65
65
)
You can’t perform that action at this time.
0 commit comments