コード例 #1
0
 def test_downloader_factory(self):
     self.assertIsInstance(
         HttpsDownloader(SiteConfig('p', 'u', 'h'), 'file'),
         get_downloader('https'))
     self.assertIsInstance(
         HttpDownloader(SiteConfig('p', 'u', 'h'), 'file'),
         get_downloader('http'))
     self.assertIsInstance(FtpDownloader(SiteConfig('p', 'u', 'h'), 'file'),
                           get_downloader('ftp'))
     self.assertIsInstance(
         SftpDownloader(SiteConfig('p', 'u', 'h'), 'file'),
         get_downloader('sftp'))