Skip to content

Commit 3711c9e

Browse files
committed
Handle timezone-aware timestamps
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>
1 parent e6b46ee commit 3711c9e

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)