'testing existing channel as a source.
It also tests how boosting manager cope with unknown channel with retrying
the lookup'

@deferred(timeout=30)
def test_chn_exist_lookup(self):

    self.create_fake_allchannel_community()
    self.create_torrents_in_channel(self.dispersy_cid_hex)
    community = ChannelCommunity.init_community(self.session.lm.dispersy, self.session.lm.dispersy.get_member(mid=self.dispersy_cid), self.session.lm.dispersy._communities['allchannel']._my_member, self.session)
    id_tmp = community._channel_id
    community._channel_id = 0
    def _set_id_channel(channel_id):
        '\n                                                set    channel    id    manually    (emulate    finding)\n                                                '
        community._channel_id = channel_id
    reactor.callLater(5, _set_id_channel, id_tmp)
    self.boosting_manager.add_source(self.dispersy_cid)
    chn_obj = self.boosting_manager.get_source_object(self.dispersy_cid)
    chn_obj._load_torrent = self._load
    def clean_community(_):
        '\n                                                cleanly    exit    the    community    we    are    in\n                                                '
        if chn_obj.community:
            chn_obj.community.cancel_all_pending_tasks()
        chn_obj.kill_tasks()
    d = self.check_source(self.dispersy_cid)
    d.addCallback(clean_community)
    return d
