def test_silent_exception(self): with mail.get_connection(fail_silently=True) as connection: send_with_connection(connection)