def test_downloadFile():
    # See if the a "wget" works
    filename = utils.download_file(
        "http://dev-versions.synapse.sagebase.org/sage_bionetworks_logo_274x128.png"
    )
    schedule_for_cleanup(filename)
    assert os.path.exists(filename)
def test_downloadFile():
    # See if the a "wget" works
    result = utils.download_file("http://dev-versions.synapse.sagebase.org/sage_bionetworks_logo_274x128.png")
    filename = result[0]
    
    # print "status: %s" % str(result[1].status))
    # print "filename: %s" % filename
    schedule_for_cleanup(filename)
    assert result, "Failed to download file: %s" % filename
    assert os.path.exists(filename)
def test_downloadFile():
    "test download file function in utils.py"
    result = utils.download_file("http://dev-versions.synapse.sagebase.org/sage_bionetworks_logo_274x128.png")
    if (result):
        # print("status: \"%s\"" % str(result[1].status))
        # print("filename: \"%s\"" % str(result[0]))
        filename = result[0]
        assert os.path.exists(filename)

        ## cleanup
        try:
            os.remove(filename)
        except Exception:
            print("warning: couldn't delete file: \"%s\"\n" % filename)
    else:
        print("failed to download file: \"%s\"" % filename)
        assert False
def test_downloadFile():
    "test download file function in utils.py"
    result = utils.download_file(
        "http://dev-versions.synapse.sagebase.org/sage_bionetworks_logo_274x128.png"
    )
    if (result):
        # print("status: \"%s\"" % str(result[1].status))
        # print("filename: \"%s\"" % str(result[0]))
        filename = result[0]
        assert os.path.exists(filename)

        ## cleanup
        try:
            os.remove(filename)
        except Exception:
            print("warning: couldn't delete file: \"%s\"\n" % filename)
    else:
        print("failed to download file: \"%s\"" % filename)
        assert False
def test_downloadFile():
    # See if the a "wget" works
    filename = utils.download_file("http://dev-versions.synapse.sagebase.org/sage_bionetworks_logo_274x128.png")
    schedule_for_cleanup(filename)
    assert os.path.exists(filename)