Skip to content

Commit

Permalink
A few more deprecation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
A5rocks committed Feb 22, 2024
1 parent 3cf4362 commit 0ff5d56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_trustme.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def assert_is_leaf(leaf_cert: x509.Certificate) -> None:
def test_basics(key_type: KeyType, expected_key_header: bytes) -> None:
ca = CA(key_type=key_type)

today = datetime.datetime.today()
today = datetime.datetime.now(datetime.timezone.utc)

assert (
b"BEGIN " + expected_key_header + b" PRIVATE KEY" in ca.private_key_pem.bytes()
Expand Down Expand Up @@ -185,7 +185,7 @@ def test_issue_cert_custom_not_before() -> None:
cert = x509.load_pem_x509_certificate(leaf_cert.cert_chain_pems[0].bytes())

for t in ["year", "month", "day", "hour", "minute", "second"]:
assert getattr(cert.not_valid_before, t) == getattr(not_before, t)
assert getattr(cert.not_valid_before_utc, t) == getattr(not_before, t)


def test_intermediate() -> None:
Expand Down

0 comments on commit 0ff5d56

Please sign in to comment.