def test_download(self): """Test download()""" url = 'http://opengameart.org/content/fieldstone-fireplace' path = os.path.join('/tmp/oga', tasks.uuidfromurl(url)) if os.path.exists(path): os.remove(path) result = tasks.download.s(url).apply() file_path = result.get() assert result.ready() assert result.successful() assert os.path.exists(file_path)
def test_uuidfromurl(self): """Test uuidfromurl()""" url = 'http://opengameart.org/content/fieldstone-fireplace' assert tasks.uuidfromurl(url) == 'd77b42a800ce66d2018e30ff181d508daf3f821b'