def METHOD_NAME(self, mock_post_connect, mock_wrap_socket_fn):
    session = TLSSession(MagicMock())
    mock_wrap_socket = MagicMock()
    mock_wrap_socket_fn.return_value = mock_wrap_socket
    session.connect(host=HOST, certfile=CERTFILE_WITH_KEY,
                    protocol=tls_proto)
    mock_wrap_socket.do_handshake.assert_called_once()