pyOpenSSL/skip-NPN-tests-if-NPN-is-not-available.patch
2019-09-30 11:14:25 -04:00

30 lines
820 B
Diff

From 4d57590bc7fc93430a1fdacc31bc0cbd9778f678 Mon Sep 17 00:00:00 2001
From: Paul Kehrer <paul.l.kehrer@gmail.com>
Date: Tue, 26 Feb 2019 21:42:12 +0800
Subject: [PATCH] skip NPN tests if NPN is not available (#822)
* skip NPN tests if NPN is not available
* use the right name
---
tests/test_ssl.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index 986463a..ed911de 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -1737,6 +1737,9 @@ class TestServerNameCallback(object):
assert args == [(server, b"foo1.example.com")]
+@pytest.mark.skipif(
+ not _lib.Cryptography_HAS_NEXTPROTONEG, reason="NPN is not available"
+)
class TestNextProtoNegotiation(object):
"""
Test for Next Protocol Negotiation in PyOpenSSL.
--
2.21.0.windows.1