@@ -254,8 +254,8 @@ async def test_app_sort_extension_get_asc(app_client, txn_client, ctx):
254254 another_item_date = datetime .strptime (
255255 first_item ["properties" ]["datetime" ], "%Y-%m-%dT%H:%M:%SZ"
256256 ) - timedelta (days = 1 )
257- second_item ["properties" ]["datetime" ] = another_item_date .isoformat (). replace (
258- "+00:00" , "Z "
257+ second_item ["properties" ]["datetime" ] = another_item_date .strftime (
258+ "%Y-%m-%dT%H:%M:%SZ "
259259 )
260260
261261 await create_item (txn_client , second_item )
@@ -276,9 +276,10 @@ async def test_app_sort_extension_get_desc(app_client, txn_client, ctx):
276276 another_item_date = datetime .strptime (
277277 first_item ["properties" ]["datetime" ], "%Y-%m-%dT%H:%M:%SZ"
278278 ) - timedelta (days = 1 )
279- second_item ["properties" ]["datetime" ] = another_item_date .isoformat (). replace (
280- "+00:00" , "Z "
279+ second_item ["properties" ]["datetime" ] = another_item_date .strftime (
280+ "%Y-%m-%dT%H:%M:%SZ "
281281 )
282+
282283 await create_item (txn_client , second_item )
283284
284285 resp = await app_client .get ("/search?sortby=-properties.datetime" )
@@ -297,9 +298,10 @@ async def test_app_sort_extension_post_asc(app_client, txn_client, ctx):
297298 another_item_date = datetime .strptime (
298299 first_item ["properties" ]["datetime" ], "%Y-%m-%dT%H:%M:%SZ"
299300 ) - timedelta (days = 1 )
300- second_item ["properties" ]["datetime" ] = another_item_date .isoformat (). replace (
301- "+00:00" , "Z "
301+ second_item ["properties" ]["datetime" ] = another_item_date .strftime (
302+ "%Y-%m-%dT%H:%M:%SZ "
302303 )
304+
303305 await create_item (txn_client , second_item )
304306
305307 params = {
@@ -322,8 +324,8 @@ async def test_app_sort_extension_post_desc(app_client, txn_client, ctx):
322324 another_item_date = datetime .strptime (
323325 first_item ["properties" ]["datetime" ], "%Y-%m-%dT%H:%M:%SZ"
324326 ) - timedelta (days = 1 )
325- second_item ["properties" ]["datetime" ] = another_item_date .isoformat (). replace (
326- "+00:00" , "Z "
327+ second_item ["properties" ]["datetime" ] = another_item_date .strftime (
328+ "%Y-%m-%dT%H:%M:%SZ "
327329 )
328330 await create_item (txn_client , second_item )
329331
0 commit comments