'testing policy (seederratio) and then fallback'

@skip('The    random    seed    is    not    reliable')
def test_fallback_policy(self):

    for i in xrange(1, 11):
        mock_metainfo = MockMeta(i)
        self.torrents[i] = {'metainfo': mock_metainfo, 'num_seeders': (- i), 'num_leechers': (- i), 'creation_date': i}
    random.seed(0)
    policy = SeederRatioPolicy(self.session)
    (torrents_start, torrents_stop) = policy.apply(self.torrents, 6)
    ids_start = [torrent['metainfo'].get_infohash() for torrent in torrents_start]
    self.assertEqual(3, len(ids_start), ('Start    failed    %s    vs    %s' % (ids_start, torrents_start)))
    ids_stop = [torrent['metainfo'].get_infohash() for torrent in torrents_stop]
    self.assertEqual(2, len(ids_stop), ('Stop    failed    %s    vs    %s' % (ids_stop, torrents_stop)))
