File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
services/web/server/tests/unit/isolated/products Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1313from faker import Faker
1414from models_library .basic_regex import TWILIO_ALPHANUMERIC_SENDER_ID_RE
1515from models_library .products import ProductName
16+ from models_library .utils .change_case import snake_to_camel
1617from pydantic import BaseModel , ValidationError
1718from pytest_simcore .helpers .faker_factories import random_product
1819from pytest_simcore .pydantic_models import (
@@ -48,14 +49,16 @@ def test_all_products_models_examples(
4849def test_product_to_static ():
4950
5051 product = Product .model_validate (Product .model_json_schema ()["examples" ][0 ])
51- assert product .to_statics () == {
52+ product_data = {snake_to_camel (k ): v for k , v in product .to_statics ().items ()}
53+ assert product_data == {
5254 "displayName" : "o²S²PARC" ,
5355 "supportEmail" :
"[email protected] " ,
5456 }
5557
5658 product = Product .model_validate (Product .model_json_schema ()["examples" ][2 ])
5759
58- assert product .to_statics () == {
60+ product_data = {snake_to_camel (k ): v for k , v in product .to_statics ().items ()}
61+ assert product_data == {
5962 "displayName" : "o²S²PARC FOO" ,
6063 "supportEmail" :
"[email protected] " ,
6164 "vendor" : {
You can’t perform that action at this time.
0 commit comments