diff --git a/arnold/models/database/sample.py b/arnold/models/database/sample.py index d16172b..01ec28c 100644 --- a/arnold/models/database/sample.py +++ b/arnold/models/database/sample.py @@ -71,4 +71,4 @@ def set_id(cls, v, values: dict) -> str: return values.get("sample_id") class Config: - allow_population_by_field_name = True + populate_by_name = True diff --git a/arnold/models/database/step.py b/arnold/models/database/step.py index 0a314c9..fffeadd 100644 --- a/arnold/models/database/step.py +++ b/arnold/models/database/step.py @@ -27,5 +27,5 @@ class Step(BaseModel): process_udfs: Optional[dict] = {} class Config: - allow_population_by_field_name = True + populate_by_name = True extra = Extra.allow diff --git a/tests/conftest.py b/tests/conftest.py index 5ee907e..a8dfe02 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -54,14 +54,14 @@ def valid_step(): @pytest.fixture(scope="function") def valid_sample(): - return Sample(sample_id="some_sample_id", _id="some_id") + return Sample(sample_id="some_sample_id", id="some_id") @pytest.fixture(scope="function") def valid_samples(): return [ - Sample(sample_id="some_sample_id", _id="some_id").model_dump(by_alias=True), - Sample(sample_id="some_other_sample_id", _id="some_other_id").model_dump(by_alias=True), + Sample(sample_id="some_sample_id", id="some_id").model_dump(), + Sample(sample_id="some_other_sample_id", id="some_other_id").model_dump(), ]