'Testing the hidden services'

@deferred(timeout=50)
@inlineCallbacks
def test_hidden_services(self):

    (yield self.setup_nodes(num_relays=4, num_exitnodes=2, seed_hops=1))
    self.setup_dht_bypass()
    (yield self.configure_hidden_seeder())
    def download_state_callback(ds):
        self.tunnel_community.monitor_downloads([ds])
        download = ds.get_download()
        if ((download.get_progress() == 1.0) and (ds.get_status() == DLSTATUS_SEEDING)):
            self.test_deferred.callback(None)
            return (0.0, False)
        return (2.0, False)
    self.tunnel_community.build_tunnels(1)
    from twisted.internet import reactor, task
    while (not list(self.tunnel_community.active_data_circuits())):
        (yield task.deferLater(reactor, 0.05, (lambda : None)))
    download = self.start_anon_download(hops=1)
    download.set_state_callback(download_state_callback)
    (yield self.test_deferred)
