@@ -161,14 +161,14 @@ async def test_it_correctly_builds_query_with_given_data(self) -> None:
161161 updated = cast (TestUpdateOne .Item , {** item , 'b' : 'c' })
162162 model , client = setup ([updated ])
163163
164- await model .update .one (str (item ['_id' ]), {'b' : 'c' })
164+ await model .update .one_by_id (str (item ['_id' ]), {'b' : 'c' })
165165 query_composed = cast (
166166 helpers .AsyncMock , client .execute_and_return ).call_args [0 ][0 ]
167167 query = helpers .composed_to_string (query_composed )
168168
169169 self .assertEqual (query , 'UPDATE test '
170170 'SET b = c '
171- f"WHERE id = { item ['_id' ]} "
171+ f"WHERE _id = { item ['_id' ]} "
172172 'RETURNING *;' )
173173
174174 @helpers .async_test
@@ -184,13 +184,13 @@ async def test_it_returns_the_new_record(self) -> None:
184184 updated = cast (TestUpdateOne .Item , {** item , 'b' : 'c' })
185185 model , _ = setup ([updated ])
186186
187- result = await model .update .one (str (item ['_id' ]), {'b' : 'c' })
187+ result = await model .update .one_by_id (str (item ['_id' ]), {'b' : 'c' })
188188
189189 self .assertEqual (result , updated )
190190
191191
192192class TestDeleteOneById (TestCase ):
193- """Testing Model.update .one_by_id"""
193+ """Testing Model.delete .one_by_id"""
194194
195195 class Item (ModelData ):
196196 """Example ModelData Item for testing."""
0 commit comments