'Testing whether the right operations happen when we receive metadata but the torrent info is invalid'

def test_metadata_received_invalid_info(self):

    def mocked_checkpoint():
        raise RuntimeError('This    code    should    not    be    reached!')
    self.libtorrent_download_impl.checkpoint = mocked_checkpoint
    self.libtorrent_download_impl.handle.get_torrent_info = (lambda : None)
    self.libtorrent_download_impl.on_metadata_received_alert(None)
