Skip to content

Commit

Permalink
test(unit/puller): Fix PyLint no-name-in-module error for timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
gfieni committed Feb 20, 2024
1 parent 59fd09f commit 122c4bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/puller/test_puller_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 122c4bb

Please sign in to comment.