Skip to content

Commit

Permalink
Handle timezone-aware timestamps (#810)
Browse files Browse the repository at this point in the history
Handle timezone-aware timestamps

Since version 2.1.0, timestamps in PyGithub are timezone-aware.
Remove tzinfo in tests for easy comparison.
Related to packit/requre#275.

Reviewed-by: František Lachman <flachman@redhat.com>
  • Loading branch information
2 parents e6b46ee + 3711c9e commit 95ceedb
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 95ceedb

Please sign in to comment.