Ejemplo n.º 1
0
 def test_multiple_downloads(self):
     """Test a directory download of multiple NZB files."""
     shutil.copy('files/nzb/gpl.nzb', self.files_dir)
     shutil.copy('files/nzb/gutenberg.nzb', self.files_dir)
     itchy.main([self.files_dir], self.options)
     self.assertTrue(os.path.exists('testdownloads/gpl/gpl.txt'))
     self.assertTrue(os.path.exists('testdownloads/gutenberg/gut96back.jpg'))
     self.assertEqual(os.listdir('testtemp'), [])
Ejemplo n.º 2
0
 def test_zip_download(self):
     """Test zip downloads."""
     shutil.copy('files/nzb/nzbs.zip', self.files_dir)
     # OptionParser's args come in a list.
     itchy.main([os.path.join(self.files_dir, 'nzbs.zip')], self.options)
     self.assertTrue(os.path.exists('testdownloads/gpl/gpl.txt'))
     self.assertTrue(os.path.exists('testdownloads/gutenberg/gut96back.jpg'))
     self.assertEqual(os.listdir('testtemp'), [])