Skip to content

Commit

Permalink
Remove unneeded test special-case
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Dec 13, 2023
1 parent 231cbea commit 136028d
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1319,25 +1319,16 @@ def test_min_max_version(self):

if has_tls_protocol(ssl.PROTOCOL_TLSv1_1):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1)

if Py_OPENSSL_IS_AWSLC:
self.assertEqual(
ctx.minimum_version, ssl.TLSVersion.TLSv1_1
)
self.assertEqual(
ctx.maximum_version, ssl.TLSVersion.TLSv1_1
)
else:
self.assertIn(
ctx.minimum_version, minimum_range
)
self.assertEqual(
ctx.maximum_version, ssl.TLSVersion.MAXIMUM_SUPPORTED
)
with self.assertRaises(ValueError):
ctx.minimum_version = ssl.TLSVersion.MINIMUM_SUPPORTED
with self.assertRaises(ValueError):
ctx.maximum_version = ssl.TLSVersion.TLSv1
self.assertIn(
ctx.minimum_version, minimum_range
)
self.assertEqual(
ctx.maximum_version, ssl.TLSVersion.MAXIMUM_SUPPORTED
)
with self.assertRaises(ValueError):
ctx.minimum_version = ssl.TLSVersion.MINIMUM_SUPPORTED
with self.assertRaises(ValueError):
ctx.maximum_version = ssl.TLSVersion.TLSv1

@unittest.skipUnless(
hasattr(ssl.SSLContext, 'security_level'),
Expand Down

0 comments on commit 136028d

Please sign in to comment.