1
0
mirror of https://github.com/httpie/cli.git synced 2025-07-03 00:56:50 +02:00

Print error when download is interrupted by server

Close #147
This commit is contained in:
Jakub Roztocil
2013-07-07 17:00:03 +02:00
parent 60f09776a5
commit 383dba524a
3 changed files with 15 additions and 12 deletions

View File

@ -110,7 +110,8 @@ with open(BIN_FILE_PATH, 'rb') as f:
def httpbin(path):
return HTTPBIN_URL + path
url = HTTPBIN_URL + path
return url
def mk_config_dir():
@ -1627,9 +1628,7 @@ class DownloadTest(BaseTestCase):
self.assertFalse(download.interrupted)
def test_download_interrupted(self):
download = Download(
output_file=open(os.devnull, 'w')
)
download = Download(output_file=open(os.devnull, 'w'))
download.start(Response(
url=httpbin('/'),
headers={'Content-Length': 5}