From b1255816a97f936b36dcbffc20c27095f2cd5271 Mon Sep 17 00:00:00 2001 From: safouuwa Date: Mon, 20 Jan 2025 17:31:56 +0100 Subject: [PATCH] small datetime change in test --- C#api/Tests/RequestLog/test_requestlog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C#api/Tests/RequestLog/test_requestlog.py b/C#api/Tests/RequestLog/test_requestlog.py index ada82e2..129da7a 100644 --- a/C#api/Tests/RequestLog/test_requestlog.py +++ b/C#api/Tests/RequestLog/test_requestlog.py @@ -3,7 +3,7 @@ import os import time import json -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone BASE_URL = "http://localhost:3000/api/v2" base_path = os.path.abspath(__file__) @@ -286,7 +286,7 @@ def test_filter_requests_by_date(client): response = client.delete(f"transfers/{created_transfer.pop('Id')}") headers = {"API_KEY": "a1b2c3d4e5"} - current_date = datetime.now().strftime("%d-%m-%Y") + current_date = (datetime.now(timezone.utc) + timedelta(hours=1)).strftime("%d-%m-%Y") response = client.get(f"/RequestLog/filter?date={current_date}", headers=headers) assert response.status_code == 200