From 3711c9eb8d3691b8b46e379859ae8480fa02e102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Wed, 4 Oct 2023 16:08:58 +0200 Subject: [PATCH] Handle timezone-aware timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since version 2.1.0, timestamps in PyGithub are timezone-aware. Remove tzinfo in tests for easy comparison. Signed-off-by: Nikola Forró --- tests/integration/github/test_generic_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/github/test_generic_commands.py b/tests/integration/github/test_generic_commands.py index 48c570c5..7aceb6d6 100644 --- a/tests/integration/github/test_generic_commands.py +++ b/tests/integration/github/test_generic_commands.py @@ -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 )