Skip to content
Permalink
Browse files

fix ftp test cases

  • Loading branch information
dangra committed Aug 8, 2014
1 parent ae1e2cc commit a274a7f7f7ea798710753a787b74161e8d387c62
Showing with 2 additions and 2 deletions.
  1. +2 −2 scrapy/tests/test_downloader_handlers.py
@@ -426,7 +426,7 @@ def test_ftp_download_success(self):
def _test(r):
self.assertEqual(r.status, 200)
self.assertEqual(r.body, 'I have the power!')
self.assertEqual(r.headers, {'Local Filename': [''], 'Size': [17]})
self.assertEqual(r.headers, {'Local Filename': [''], 'Size': ['17']})
return self._add_test_callbacks(d, _test)

def test_ftp_download_notexist(self):
@@ -446,7 +446,7 @@ def test_ftp_local_filename(self):

def _test(r):
self.assertEqual(r.body, local_fname)
self.assertEqual(r.headers, {'Local Filename': ['/tmp/file.txt'], 'Size': [17]})
self.assertEqual(r.headers, {'Local Filename': ['/tmp/file.txt'], 'Size': ['17']})
self.assertTrue(os.path.exists(local_fname))
with open(local_fname) as f:
self.assertEqual(f.read(), "I have the power!")

0 comments on commit a274a7f

Please sign in to comment.