Adjust tests to not look for warnings when using SecureTransport
@@ -118,7 +118,8 @@ class TestHTTPS(HTTPSDummyServerTestCase):
# Modern versions of Python, or systems using PyOpenSSL, don't
# emit warnings.
- if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL:
+ if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL \
+ or util.IS_SECURETRANSPORT:
self.assertFalse(warn.called, warn.call_args_list)
else:
self.assertTrue(warn.called)
@@ -145,7 +146,8 @@ class TestHTTPS(HTTPSDummyServerTestCase):
# Modern versions of Python, or systems using PyOpenSSL, don't
# emit warnings.
- if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL:
+ if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL \
+ or util.IS_SECURETRANSPORT:
self.assertFalse(warn.called, warn.call_args_list)
else:
self.assertTrue(warn.called)
@@ -172,7 +174,8 @@ class TestHTTPS(HTTPSDummyServerTestCase):
# Modern versions of Python, or systems using PyOpenSSL, don't
# emit warnings.
- if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL:
+ if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL \
+ or util.IS_SECURETRANSPORT:
self.assertFalse(warn.called, warn.call_args_list)
else:
self.assertTrue(warn.called)
@@ -276,7 +279,8 @@ class TestHTTPS(HTTPSDummyServerTestCase):
# the unverified warning. Older systems may also emit other
# warnings, which we want to ignore here.
calls = warn.call_args_list
- if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL:
+ if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL \
+ or util.IS_SECURETRANSPORT:
category = calls[0][0][1]
elif util.HAS_SNI:
category = calls[1][0][1]
@@ -299,7 +303,8 @@ class TestHTTPS(HTTPSDummyServerTestCase):
# the unverified warning. Older systems may also emit other
# warnings, which we want to ignore here.
calls = warn.call_args_list
- if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL:
+ if sys.version_info >= (2, 7, 9) or util.IS_PYOPENSSL \
+ or util.IS_SECURETRANSPORT:
category = calls[0][0][1]
elif util.HAS_SNI:
category = calls[1][0][1]
