]> granicus.if.org Git - python/commitdiff
Issue #25114: Fix test_asyncio
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 21 Sep 2015 20:20:19 +0000 (22:20 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 21 Sep 2015 20:20:19 +0000 (22:20 +0200)
ssl.SSLContext() does not always disable compression. Fix unit test.

Lib/test/test_asyncio/test_events.py

index 24c3f1e3668a5c978af21de6fed499eee6e8765c..34881016891b995e8a1703ae483cb2b182f14230 100644 (file)
@@ -619,9 +619,6 @@ class EventLoopTestsMixin:
         self.assertEqual(peercert,
                          client.get_extra_info('peercert'))
 
-        # Python disables compression to prevent CRIME attacks by default
-        self.assertIsNone(client.get_extra_info('compression'))
-
         # test SSL cipher
         cipher = client.get_extra_info('cipher')
         self.assertIsInstance(cipher, tuple)
@@ -639,6 +636,8 @@ class EventLoopTestsMixin:
                          client.get_extra_info('cipher'))
         self.assertEqual(sslobj.getpeercert(),
                          client.get_extra_info('peercert'))
+        self.assertEqual(sslobj.compression(),
+                         client.get_extra_info('compression'))
 
     def _basetest_create_ssl_connection(self, connection_fut,
                                         check_sockname=True,