'Setup various variables and load the tunnel community in the main downloader session.'

@blocking_call_on_reactor_thread
@inlineCallbacks
def setUp(self, autoload_discovery=True):

    (yield TestAsServer.setUp(self, autoload_discovery=autoload_discovery))
    self.seed_tdef = None
    self.sessions = []
    self.session2 = None
    self.crypto_enabled = True
    self.bypass_dht = False
    self.seed_config = None
    self.tunnel_community_seeder = None
    self.eccrypto = ECCrypto()
    ec = self.eccrypto.generate_key(u'curve25519')
    HiddenTunnelCommunityTests.master_key = self.eccrypto.key_to_bin(ec.pub()).encode('hex')
    self.tunnel_community = self.load_tunnel_community_in_session(self.session, exitnode=True)
    self.tunnel_communities = []
