'Test the metainfo timeout of the DHT session'

@deferred(timeout=10)
def test_metainfo_timeout(self):

    test_deferred = Deferred()
    def get_metainfo_timeout(*args, **kwargs):
        timeout_cb = kwargs.get('timeout_callback')
        timeout_cb(('a' * 20))
    def on_timeout(failure):
        test_deferred.callback(None)
    self.session.lm.ltmgr = MockObject()
    self.session.lm.ltmgr.get_metainfo = get_metainfo_timeout
    self.dht_session.connect_to_tracker().addErrback(on_timeout)
    return test_deferred
