Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter warning caused by deprecated pyopenssl usage of datetime #200

Merged
merged 4 commits into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import functools
import sys
import unittest
import warnings

import pytest
import test_util
Expand All @@ -22,7 +23,13 @@ def setUp(self) -> None:
self.cert_other = test_util.load_comparable_cert("cert-san.pem")

def test_getattr_proxy(self) -> None:
assert self.cert1.has_expired() is True
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore",
category=DeprecationWarning,
message=".*Use timezone-aware objects to represent datetimes",
)
assert self.cert1.has_expired() is True

def test_eq(self) -> None:
assert self.req1 == self.req2
Expand Down
Loading