@@ -73,7 +73,7 @@ async def test_it_correctly_builds_query_with_given_id(self) -> None:
7373
7474 self .assertEqual (query , "SELECT * "
7575 "FROM test "
76- f"WHERE id = { item ['_id' ]} ;" )
76+ f"WHERE _id = { item ['_id' ]} ;" )
7777
7878 @helpers .async_test
7979 async def test_it_returns_a_single_result (self ) -> None :
@@ -122,7 +122,7 @@ async def test_it_correctly_builds_query_with_given_data(self) -> None:
122122 helpers .AsyncMock , client .execute_and_return ).call_args [0 ][0 ]
123123 query = helpers .composed_to_string (query_composed )
124124
125- self .assertEqual (query , 'INSERT INTO test(_id,a,b) '
125+ self .assertEqual (query , 'INSERT INTO test (_id,a,b) '
126126 f"VALUES ({ item ['_id' ]} ,a,b) "
127127 'RETURNING *;' )
128128
@@ -206,7 +206,7 @@ async def test_it_correctly_builds_query_with_given_data(self) -> None:
206206 }
207207 model , client = setup ([item ])
208208
209- await model .delete .one (str (item ['_id' ]))
209+ await model .delete .one_by_id (str (item ['_id' ]))
210210
211211 query_composed = cast (
212212 helpers .AsyncMock , client .execute_and_return ).call_args [0 ][0 ]
@@ -225,7 +225,7 @@ async def test_it_returns_the_deleted_record(self) -> None:
225225 }
226226 model , _ = setup ([item ])
227227
228- result = await model .delete .one (str (item ['_id' ]))
228+ result = await model .delete .one_by_id (str (item ['_id' ]))
229229
230230 self .assertEqual (result , item )
231231
0 commit comments