summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-14 20:26:57 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-14 20:26:57 (GMT)
commitbbbf45b08d49bd74341cccc24d8fe345cf1eea85 (patch)
treee8f95984dd9ab27fcdf176e45bd4d88651d0dc15 /Lib/test/test_asyncio/test_events.py
parented589f5354d2f757c43505b9e1b1f3dabeb15428 (diff)
parent1cae9ec96667e80e85fcdb034206dfd614708cd1 (diff)
downloadcpython-bbbf45b08d49bd74341cccc24d8fe345cf1eea85.zip
cpython-bbbf45b08d49bd74341cccc24d8fe345cf1eea85.tar.gz
cpython-bbbf45b08d49bd74341cccc24d8fe345cf1eea85.tar.bz2
Merge with Python 3.4
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 06552f8..b065749 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -819,9 +819,10 @@ class EventLoopTestsMixin:
# no CA loaded
f_c = self.loop.create_connection(MyProto, host, port,
ssl=sslcontext_client)
- with self.assertRaisesRegex(ssl.SSLError,
- 'certificate verify failed '):
- self.loop.run_until_complete(f_c)
+ with test_utils.disable_logger():
+ with self.assertRaisesRegex(ssl.SSLError,
+ 'certificate verify failed '):
+ self.loop.run_until_complete(f_c)
# close connection
self.assertIsNone(proto.transport)
@@ -845,9 +846,10 @@ class EventLoopTestsMixin:
f_c = self.loop.create_unix_connection(MyProto, path,
ssl=sslcontext_client,
server_hostname='invalid')
- with self.assertRaisesRegex(ssl.SSLError,
- 'certificate verify failed '):
- self.loop.run_until_complete(f_c)
+ with test_utils.disable_logger():
+ with self.assertRaisesRegex(ssl.SSLError,
+ 'certificate verify failed '):
+ self.loop.run_until_complete(f_c)
# close connection
self.assertIsNone(proto.transport)
@@ -871,10 +873,11 @@ class EventLoopTestsMixin:
# incorrect server_hostname
f_c = self.loop.create_connection(MyProto, host, port,
ssl=sslcontext_client)
- with self.assertRaisesRegex(
- ssl.CertificateError,
- "hostname '127.0.0.1' doesn't match 'localhost'"):
- self.loop.run_until_complete(f_c)
+ with test_utils.disable_logger():
+ with self.assertRaisesRegex(
+ ssl.CertificateError,
+ "hostname '127.0.0.1' doesn't match 'localhost'"):
+ self.loop.run_until_complete(f_c)
# close connection
proto.transport.close()