Mercurial > kallithea
diff rhodecode/tests/functional/test_files.py @ 2318:058e2743e7b7 beta
fixes issue #455 Creating an archive generates an exception on Windows
- reverted the FileIter implementation as it had the same issue on windows and
probably on unix as ref #448
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 20 May 2012 14:41:03 +0200 |
parents | 3c1d991755df |
children | 86aa4f1f130b |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_files.py Sun May 20 14:34:45 2012 +0200 +++ b/rhodecode/tests/functional/test_files.py Sun May 20 14:41:03 2012 +0200 @@ -200,9 +200,10 @@ self.assertEqual(response.status, '200 OK') heads = [ - ('Content-Type', 'text/html; charset=utf-8'), - ('Content-Length', '0'), ('Pragma', 'no-cache'), - ('Cache-Control', 'no-cache') + ('Pragma', 'no-cache'), + ('Cache-Control', 'no-cache'), + ('Content-Disposition', 'attachment; filename=%s' % filename), + ('Content-Type', '%s; charset=utf-8' % info[0]), ] self.assertEqual(response.response._headers.items(), heads) @@ -212,7 +213,8 @@ for arch_ext in ['tar', 'rar', 'x', '..ax', '.zipz']: fname = '27cd5cce30c96924232dffcd24178a07ffeb5dfc%s' % arch_ext - response = self.app.get(url(controller='files', action='archivefile', + response = self.app.get(url(controller='files', + action='archivefile', repo_name=HG_REPO, fname=fname)) response.mustcontain('Unknown archive type') @@ -220,10 +222,11 @@ def test_archival_wrong_revision(self): self.log_user() - for rev in ['00x000000', 'tar', 'wrong', '@##$@$424213232', '232dffcd']: + for rev in ['00x000000', 'tar', 'wrong', '@##$@$42413232', '232dffcd']: fname = '%s.zip' % rev - response = self.app.get(url(controller='files', action='archivefile', + response = self.app.get(url(controller='files', + action='archivefile', repo_name=HG_REPO, fname=fname)) response.mustcontain('Unknown revision')