comparison 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
comparison
equal deleted inserted replaced
2291:982d8a80e048 2294:3c1d991755df
197 action='archivefile', 197 action='archivefile',
198 repo_name=HG_REPO, 198 repo_name=HG_REPO,
199 fname=fname)) 199 fname=fname))
200 200
201 self.assertEqual(response.status, '200 OK') 201 self.assertEqual(response.status, '200 OK')
202 self.assertEqual(response.response._headers.items(), 202 heads = [
203 [('Pragma', 'no-cache'), 203 ('Content-Type', 'text/html; charset=utf-8'),
204 ('Cache-Control', 'no-cache'), 204 ('Content-Length', '0'), ('Pragma', 'no-cache'),
205 ('Content-Type', '%s; charset=utf-8' % info[0]), 205 ('Cache-Control', 'no-cache')
206 ('Content-Disposition', 'attachment; filename=%s' % filename), 206 ]
207 ] 207 self.assertEqual(response.response._headers.items(), heads)
208 )
209 208
210 def test_archival_wrong_ext(self): 209 def test_archival_wrong_ext(self):
211 self.log_user() 210 self.log_user()
212 211
213 for arch_ext in ['tar', 'rar', 'x', '..ax', '.zipz']: 212 for arch_ext in ['tar', 'rar', 'x', '..ax', '.zipz']: