(original) (raw)

changeset: 103114:9377ed49746b user: Christian Heimes christian@python.org date: Tue Sep 06 10:45:44 2016 +0200 files: Lib/test/test_ssl.py description: Issue 27866: relax test case for set_cipher() and allow more cipher suites diff -r 8ee4ed577c03 -r 9377ed49746b Lib/test/test_ssl.py --- a/Lib/test/test_ssl.py Mon Sep 05 18:16:01 2016 -0700 +++ b/Lib/test/test_ssl.py Tue Sep 06 10:45:44 2016 +0200 @@ -837,11 +837,10 @@ @unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old') def test_get_ciphers(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) - ctx.set_ciphers('ECDHE+AESGCM:!ECDSA') + ctx.set_ciphers('AESGCM') names = set(d['name'] for d in ctx.get_ciphers()) - self.assertEqual(names, - {'ECDHE-RSA-AES256-GCM-SHA384', - 'ECDHE-RSA-AES128-GCM-SHA256'}) + self.assertIn('ECDHE-RSA-AES256-GCM-SHA384', names) + self.assertIn('ECDHE-RSA-AES128-GCM-SHA256', names) @skip_if_broken_ubuntu_ssl def test_options(self): /christian@python.org