Skip to content

Commit

Permalink
Handle timezone-aware timestamps
Browse files Browse the repository at this point in the history
Since version 2.1.0, timestamps in PyGithub are timezone-aware.
Remove tzinfo in tests for easy comparison.

Signed-off-by: Nikola Forró <nforro@redhat.com>
  • Loading branch information
nforro committed Oct 6, 2023
1 parent e6b46ee commit 3711c9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/github/test_generic_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ def test_get_commit_statuses(self):
assert last_flag.state == CommitStatus.success
assert last_flag.context == "test"
assert last_flag.uid
assert last_flag.created == datetime(
assert last_flag.created.replace(tzinfo=None) == datetime(
year=2019, month=9, day=19, hour=12, minute=21, second=6
)
assert last_flag.edited == datetime(
assert last_flag.edited.replace(tzinfo=None) == datetime(
year=2019, month=9, day=19, hour=12, minute=21, second=6
)

Expand Down

0 comments on commit 3711c9e

Please sign in to comment.