diff rhodecode/tests/functional/test_files.py @ 2294:3c1d991755df beta

Use paste fileapp to properly send the archive size
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 17 May 2012 02:44:10 +0200
parents 5893414dea91
children 058e2743e7b7
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_files.py	Thu May 17 01:28:25 2012 +0200
+++ b/rhodecode/tests/functional/test_files.py	Thu May 17 02:44:10 2012 +0200
@@ -199,13 +199,12 @@
                                         fname=fname))
 
             self.assertEqual(response.status, '200 OK')
-            self.assertEqual(response.response._headers.items(),
-             [('Pragma', 'no-cache'),
-              ('Cache-Control', 'no-cache'),
-              ('Content-Type', '%s; charset=utf-8' % info[0]),
-              ('Content-Disposition', 'attachment; filename=%s' % filename),
-             ]
-            )
+            heads = [
+            ('Content-Type', 'text/html; charset=utf-8'),
+            ('Content-Length', '0'), ('Pragma', 'no-cache'),
+            ('Cache-Control', 'no-cache')
+            ]
+            self.assertEqual(response.response._headers.items(), heads)
 
     def test_archival_wrong_ext(self):
         self.log_user()