@@ -946,29 +946,29 @@ def test_start_tls_smtp(self):
946946 def test_handshake_fail (self ):
947947 server_future = self .server_start_tls (_server_ssl_options ())
948948 # Certificates are verified with the default configuration.
949- client_future = self .client_start_tls (server_hostname = "localhost" )
950949 with ExpectLog (gen_log , "SSL Error" ):
950+ client_future = self .client_start_tls (server_hostname = "localhost" )
951951 with self .assertRaises (ssl .SSLError ):
952952 yield client_future
953- with self .assertRaises ((ssl .SSLError , socket .error )):
954- yield server_future
953+ with self .assertRaises ((ssl .SSLError , socket .error )):
954+ yield server_future
955955
956956 @gen_test
957957 def test_check_hostname (self ):
958958 # Test that server_hostname parameter to start_tls is being used.
959959 # The check_hostname functionality is only available in python 2.7 and
960960 # up and in python 3.4 and up.
961961 server_future = self .server_start_tls (_server_ssl_options ())
962- client_future = self .client_start_tls (
963- ssl .create_default_context (), server_hostname = "127.0.0.1"
964- )
965962 with ExpectLog (gen_log , "SSL Error" ):
963+ client_future = self .client_start_tls (
964+ ssl .create_default_context (), server_hostname = "127.0.0.1"
965+ )
966966 with self .assertRaises (ssl .SSLError ):
967967 # The client fails to connect with an SSL error.
968968 yield client_future
969- with self .assertRaises (Exception ):
970- # The server fails to connect, but the exact error is unspecified.
971- yield server_future
969+ with self .assertRaises (Exception ):
970+ # The server fails to connect, but the exact error is unspecified.
971+ yield server_future
972972
973973
974974class WaitForHandshakeTest (AsyncTestCase ):
0 commit comments