Example #1
0
def test_download1():
    file = download('http://example.com/file.txt')
    # check that the file has been downloaded.
    assert os.path.exists(file)
    # check that the file contains the contents of the remote file
    with open(file, 'r') as f:
        contents = f.read()
    print(contents)
    assert contents == 'test'
Example #2
0
def test_download1():
    file = download("http://example.com/file.txt")
    # Check that the file has been downloaded.
    assert os.path.exists(file)
    # Check that the file contains the contents of the remote file.
    with open(file, 'r') as f:
        contents = f.read()
    print(contents)
    assert contents == 'test'
Example #3
0
def test_download2():
    file = download('http://example.com/')
    # check that the file has been downloaded.
    assert os.path.exists(file)
Example #4
0
def test_download2():
    file = download("http://example.com/")
    assert os.path.exists(file)
def test_download2():
    file = download("http://example.com/")
    assert os.path.exists(file)