Skip to content

Commit

Permalink
Fixed two leftover mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Nov 13, 2022
1 parent 732e31d commit edbb44f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/conftest.py
Expand Up @@ -57,9 +57,7 @@ def ca() -> CA:
def server_context(ca: CA) -> SSLContext:
server_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
if hasattr(ssl, "OP_IGNORE_UNEXPECTED_EOF"):
server_context.options ^= (
ssl.OP_IGNORE_UNEXPECTED_EOF # type: ignore[attr-defined]
)
server_context.options ^= ssl.OP_IGNORE_UNEXPECTED_EOF

ca.issue_cert("localhost").configure_cert(server_context)
return server_context
Expand All @@ -69,9 +67,7 @@ def server_context(ca: CA) -> SSLContext:
def client_context(ca: CA) -> SSLContext:
client_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
if hasattr(ssl, "OP_IGNORE_UNEXPECTED_EOF"):
client_context.options ^= (
ssl.OP_IGNORE_UNEXPECTED_EOF # type: ignore[attr-defined]
)
client_context.options ^= ssl.OP_IGNORE_UNEXPECTED_EOF

ca.configure_trust(client_context)
return client_context
Expand Down

0 comments on commit edbb44f

Please sign in to comment.