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"))
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"))
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"))