def test_missing_directories_are_built_when_image_downloaded(self): self.assertFalse(os.path.isfile("tmp/baz/test.png")) # image.download("http://i.imgur.com/wG51k7v.png", "tmp/baz/test.png") image.download("http://i.imgur.com/pY3JZsH.jpg", "tmp/baz/test.jpg") # new self.assertTrue(os.path.isfile("tmp/baz/test.jpg"))
def test_download(self): self.assertFalse(os.path.isfile("tmp/test.png")) image.download("http://i.imgur.com/wG51k7v.png", "tmp/test.png") self.assertTrue(os.path.isfile("tmp/test.png"))