def METHOD_NAME(time_sleep, created_socket, recv_message, crypt):
    connect_timeouts = 3
    created_socket.connect.side_effect = [socket.timeout] * connect_timeouts + [None]
    assert crypt.raw_daemon_request(data={}) == recv_message.return_value
    assert created_socket.connect.call_count == connect_timeouts + 1
    assert time_sleep.call_count == 3