Ejemplo n.º 1
0
 def test_process_only_from(self):
     download_queue, used_folders = manager.process_submissions(test_submissions, ".", True, True, ["testsubreddit"])
     # All must have passed again, all submissions are from correct subreddit
     for url, folder, title in download_queue:
         self.assertTrue(url in original_urls)
     self.assertEqual(len(download_queue), len(test_submissions))
Ejemplo n.º 2
0
 def test_process_nowhere(self):
     download_queue, used_folders = manager.process_submissions(test_submissions, ".", True, True, ["nowhere"])
     # None should pass, all are from wrong subreddit
     self.assertEqual(len(download_queue), 0)
Ejemplo n.º 3
0
 def test_process_all(self):
     download_queue, used_folders = manager.process_submissions(test_submissions, ".", True, True, [])
     # Checking for only_from, ensure that none got filtered
     for url, folder, title in download_queue:
         self.assertTrue(url in original_urls)
     self.assertEqual(len(download_queue), len(test_submissions))