File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,9 +237,7 @@ async def query_endpoint_handler(
237237 quota_limiters = configuration .quota_limiters , user_id = user_id
238238 )
239239
240- completed_at = datetime .datetime .now (datetime .UTC ).strftime (
241- "%Y-%m-%dT%H:%M:%SZ"
242- )
240+ completed_at = datetime .datetime .now (datetime .UTC ).strftime ("%Y-%m-%dT%H:%M:%SZ" )
243241 conversation_id = normalize_conversation_id (responses_params .conversation )
244242
245243 logger .info ("Storing query results" )
Original file line number Diff line number Diff line change 22
33"""Unit tests for the /conversations REST API endpoints."""
44
5- from datetime import datetime , timezone
5+ from datetime import datetime , UTC
66from typing import Any , cast
77
88import pytest
@@ -361,9 +361,7 @@ async def test_successful_retrieval(
361361 mocker .patch ("app.endpoints.conversations_v2.configuration" , mock_configuration )
362362
363363 timestamp_str = "2024-01-01T00:00:00Z"
364- timestamp_dt = datetime .fromisoformat (timestamp_str ).replace (
365- tzinfo = timezone .utc
366- )
364+ timestamp_dt = datetime .fromisoformat (timestamp_str ).replace (tzinfo = UTC )
367365 timestamp = timestamp_dt .timestamp ()
368366
369367 mock_configuration .conversation_cache .list .return_value = [
You can’t perform that action at this time.
0 commit comments