コード例 #1
0
 def test_download_gallery_with_multiple_images(self):
     self.assertFalse(os.path.isfile("tmp/gallery/iqbBadV.jpg"))
     # imgur.download('http://imgur.com/gallery/ZHAehn1', "tmp/gallery")
     imgur.download('http://imgur.com/gallery/zUlsR', "tmp/gallery")
     self.assertTrue(os.path.isfile("tmp/gallery/iqbBadV.jpg"))
コード例 #2
0
 def test_download(self):
     self.assertFalse(os.path.isfile("tmp/test/pY3JZsH.jpg"))
     imgur.download("http://i.imgur.com/pY3JZsH.jpg", "tmp/test")
     self.assertTrue(os.path.isfile("tmp/test/pY3JZsH.jpg"))
コード例 #3
0
 def test_download_plain_image(self):
     self.assertFalse(os.path.isfile("tmp/kIxNs2s.png"))
     imgur.download('http://i.imgur.com/kIxNs2s.png', 'tmp')
     self.assertTrue(os.path.isfile("tmp/kIxNs2s.png"))
コード例 #4
0
 def test_download_gallery_with_multiple_images(self):
     self.assertFalse(os.path.isfile("tmp/gallery/iqbBadV.jpg"))
     # imgur.download('http://imgur.com/gallery/ZHAehn1', "tmp/gallery")
     imgur.download('http://imgur.com/gallery/zUlsR', "tmp/gallery")
     self.assertTrue(os.path.isfile("tmp/gallery/iqbBadV.jpg"))
コード例 #5
0
 def test_download(self):
     self.assertFalse(os.path.isfile("tmp/test/pY3JZsH.jpg"))
     imgur.download("http://i.imgur.com/pY3JZsH.jpg", "tmp/test")
     self.assertTrue(os.path.isfile("tmp/test/pY3JZsH.jpg"))
コード例 #6
0
 def test_download_plain_image(self):
     self.assertFalse(os.path.isfile("tmp/kIxNs2s.png"))
     imgur.download('http://i.imgur.com/kIxNs2s.png', 'tmp')
     self.assertTrue(os.path.isfile("tmp/kIxNs2s.png"))