diff --git a/tests/unit/puller/test_puller_actor.py b/tests/unit/puller/test_puller_actor.py index b42d9e12..b70023b6 100644 --- a/tests/unit/puller/test_puller_actor.py +++ b/tests/unit/puller/test_puller_actor.py @@ -28,7 +28,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import logging -from datetime import datetime, UTC +from datetime import datetime, timezone from powerapi.database import BaseDB from powerapi.filter import Filter @@ -43,7 +43,7 @@ def _setup_fake_database(num_reports: int = 5): """ Set up a fake database for tests. """ - return SilentFakeDB([Report(datetime.fromtimestamp(i, UTC), 'pytest', f'report-{i}') for i in range(num_reports)]) + return SilentFakeDB([Report(datetime.fromtimestamp(i, timezone.utc), 'pytest', f'report-{i}') for i in range(num_reports)]) def _setup_puller_actor(name: str, database: BaseDB, report_filter: Filter, stream_mode: bool = False):