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'
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'
def test_download2(): file = download('http://example.com/') # check that the file has been downloaded. assert os.path.exists(file)
def test_download2(): file = download("http://example.com/") assert os.path.exists(file)