# generated by copilot

from cookit.pyd import CamelAliasModel, model_dump, type_validate_python


async def test_camel_alias_model():
    assert isinstance(CamelAliasModel(), CamelAliasModel)

    class TestModel(CamelAliasModel):
        test_field1: int
        test2: str

    data = {"testField1": 1, "test2": "2"}
    model = type_validate_python(TestModel, data)
    assert model_dump(model, by_alias=True) == data
