mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-28 08:48:04 +01:00
Check for the correct filename in document headers
This commit is contained in:
parent
a596fd82f1
commit
1d4b79f6aa
@ -563,9 +563,10 @@ class TestServeView(TestCase):
|
||||
def test_response_code(self):
|
||||
self.assertEqual(self.get().status_code, 200)
|
||||
|
||||
@unittest.expectedFailure # Filename has a random string appended to it
|
||||
def test_content_disposition_header(self):
|
||||
self.assertEqual(self.get()['Content-Disposition'], 'attachment; filename=example.doc')
|
||||
self.assertEqual(
|
||||
self.get()['Content-Disposition'],
|
||||
'attachment; filename="{}"'.format(self.document.filename))
|
||||
|
||||
def test_content_length_header(self):
|
||||
self.assertEqual(self.get()['Content-Length'], '25')
|
||||
|
Loading…
Reference in New Issue
Block a user