|
13 | 13 | from faker import Faker |
14 | 14 | from models_library.basic_regex import TWILIO_ALPHANUMERIC_SENDER_ID_RE |
15 | 15 | from models_library.products import ProductName |
16 | | -from models_library.utils.change_case import snake_to_camel |
17 | 16 | from pydantic import BaseModel, ValidationError |
18 | 17 | from pytest_simcore.helpers.faker_factories import random_product |
19 | 18 | from pytest_simcore.pydantic_models import ( |
|
22 | 21 | ) |
23 | 22 | from simcore_postgres_database.models.products import products as products_table |
24 | 23 | from simcore_service_webserver.products.models import Product |
| 24 | +from simcore_service_webserver.statics._events import _get_product_data |
25 | 25 |
|
26 | 26 |
|
27 | 27 | @pytest.mark.parametrize( |
@@ -49,15 +49,15 @@ def test_all_products_models_examples( |
49 | 49 | def test_product_to_static(): |
50 | 50 |
|
51 | 51 | product = Product.model_validate(Product.model_json_schema()["examples"][0]) |
52 | | - product_data = {snake_to_camel(k): v for k, v in product.to_statics().items()} |
| 52 | + product_data = _get_product_data(product) |
53 | 53 | assert product_data == { |
54 | 54 | "displayName": "o²S²PARC", |
55 | 55 | "supportEmail": "[email protected]", |
56 | 56 | } |
57 | 57 |
|
58 | 58 | product = Product.model_validate(Product.model_json_schema()["examples"][2]) |
59 | 59 |
|
60 | | - product_data = {snake_to_camel(k): v for k, v in product.to_statics().items()} |
| 60 | + product_data = _get_product_data(product) |
61 | 61 | assert product_data == { |
62 | 62 | "displayName": "o²S²PARC FOO", |
63 | 63 | "supportEmail": "[email protected]", |
|
0 commit comments