mirror of
https://github.com/apache/httpd.git
synced 2025-07-20 18:21:29 +00:00
Improve compatibility with older python.
According to python 3.11.0 changelog, "datetime.UTC" was added as an alias for "datetime.timezone.utc". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -55,7 +55,7 @@ class TestProfiles:
|
||||
assert stat["profile"] == "default", f'{stat}'
|
||||
assert stat['cert']['rsa']['valid']['until'], f'{stat}'
|
||||
ts = email.utils.parsedate_to_datetime(stat['cert']['rsa']['valid']['until'])
|
||||
valid = ts - datetime.datetime.now(datetime.UTC)
|
||||
valid = ts - datetime.datetime.now(datetime.timezone.utc)
|
||||
assert valid.days in [89, 90]
|
||||
|
||||
# create a MD with 'shortlived' profile, get cert
|
||||
@ -79,7 +79,7 @@ class TestProfiles:
|
||||
assert stat["profile"] == "shortlived", f'{stat}'
|
||||
assert stat['cert']['rsa']['valid']['until'], f'{stat}'
|
||||
ts = email.utils.parsedate_to_datetime(stat['cert']['rsa']['valid']['until'])
|
||||
valid = ts - datetime.datetime.now(datetime.UTC)
|
||||
valid = ts - datetime.datetime.now(datetime.timezone.utc)
|
||||
assert valid.days in [5, 6]
|
||||
|
||||
# create a MD with unknown 'XXX' profile, get cert
|
||||
|
Reference in New Issue
Block a user