@@ -169,18 +169,18 @@ def test_roundtrip(required_arguments, tmp_path):
169169 assert isinstance (entity , cls )
170170
171171 # Get the model instance from the entity instance
172- model = entity ._to_model (tmp_path )
172+ model = entity .to_model (tmp_path , unstored = True )
173173 assert isinstance (model , BaseModel )
174174
175175 # Reconstruct the entity instance from the model instance
176- roundtrip = cls ._from_model (model )
176+ roundtrip = cls .from_model (model )
177177 assert isinstance (roundtrip , cls )
178178
179179 # Get the model instance again from the reconstructed entity and check that the fields that would be passed to the
180180 # ORM entity constructor are identical of the original model. The ``model_to_orm_field_values`` excludes values of
181181 # fields that define ``exclude_to_orm=True`` because these can change during roundtrips. This because these
182182 # typically correspond to entity fields that have defaults set on the database level, e.g., UUIDs.
183- roundtrip_model = roundtrip ._to_model (tmp_path )
183+ roundtrip_model = roundtrip .to_model (tmp_path , unstored = True )
184184 original_field_values = cls .model_to_orm_field_values (model )
185185
186186 for key , value in cls .model_to_orm_field_values (roundtrip_model ).items ():
@@ -206,5 +206,5 @@ def test_roundtrip_serialization(required_arguments, tmp_path):
206206 assert isinstance (entity , cls )
207207
208208 # Get the model instance from the entity instance
209- serialized_entity = entity .serialize (tmp_path )
210- entity .from_serialized (** serialized_entity )
209+ serialized_entity = entity .serialize (tmp_path , unstored = True , mode = 'python' )
210+ entity .from_serialized (unstored = True , ** serialized_entity )
0 commit comments