diff options
author | LuK1337 <priv.luk@gmail.com> | 2023-09-16 09:36:49 +0200 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-09-18 23:59:37 +0000 |
commit | aadd12cb08bede15946bc790f6005bbe120c17bc (patch) | |
tree | ec31d207c9a1985171a27bdef48840c46e52bb8d /tests/test_git_superproject.py | |
parent | b8fd19215f59f7f8dbe69528aefca700a2190ecd (diff) | |
download | git-repo-aadd12cb08bede15946bc790f6005bbe120c17bc.tar.gz |
Use non-deprecated API for obtaining UTC time
DeprecationWarning: datetime.datetime.utcnow() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
Change-Id: Ia2c46fb87c544d98cc2dd68a829f67d4770b479c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386615
Tested-by: Łukasz Patron <priv.luk@gmail.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Łukasz Patron <priv.luk@gmail.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'tests/test_git_superproject.py')
-rw-r--r-- | tests/test_git_superproject.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index dc46ec65..600b069f 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py | |||
@@ -108,7 +108,9 @@ class SuperprojectTestCase(unittest.TestCase): | |||
108 | self.assertRegex(log_entry["sid"], self.FULL_SID_REGEX) | 108 | self.assertRegex(log_entry["sid"], self.FULL_SID_REGEX) |
109 | else: | 109 | else: |
110 | self.assertRegex(log_entry["sid"], self.SELF_SID_REGEX) | 110 | self.assertRegex(log_entry["sid"], self.SELF_SID_REGEX) |
111 | self.assertRegex(log_entry["time"], r"^\d+-\d+-\d+T\d+:\d+:\d+\.\d+Z$") | 111 | self.assertRegex( |
112 | log_entry["time"], r"^\d+-\d+-\d+T\d+:\d+:\d+\.\d+\+00:00$" | ||
113 | ) | ||
112 | 114 | ||
113 | def readLog(self, log_path): | 115 | def readLog(self, log_path): |
114 | """Helper function to read log data into a list.""" | 116 | """Helper function to read log data into a list.""" |