Skip to content

Commit 95ceedb

Browse files
Handle timezone-aware timestamps (#810)
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>
2 parents e6b46ee + 3711c9e commit 95ceedb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/github/test_generic_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ def test_get_commit_statuses(self):
190190
assert last_flag.state == CommitStatus.success
191191
assert last_flag.context == "test"
192192
assert last_flag.uid
193-
assert last_flag.created == datetime(
193+
assert last_flag.created.replace(tzinfo=None) == datetime(
194194
year=2019, month=9, day=19, hour=12, minute=21, second=6
195195
)
196-
assert last_flag.edited == datetime(
196+
assert last_flag.edited.replace(tzinfo=None) == datetime(
197197
year=2019, month=9, day=19, hour=12, minute=21, second=6
198198
)
199199

0 commit comments

Comments
 (0)