'test policy based on creation date'

def test_creationdate_policy(self):

    policy = CreationDatePolicy(self.session)
    (torrents_start, torrents_stop) = policy.apply(self.torrents, 5, force=True)
    ids_start = [torrent['metainfo'].get_infohash() for torrent in torrents_start]
    self.assertEqual(ids_start, [10, 8, 6])
    ids_stop = [torrent['metainfo'].get_infohash() for torrent in torrents_stop]
    self.assertEqual(ids_stop, [5, 3, 1])
