From 1ade9d2ed7dbbd268a75fd6b4228b868a48ee5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Tue, 10 Jan 2023 21:41:49 +0100 Subject: [PATCH] Minor test changes --- tests/test_utils_response.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/test_utils_response.py b/tests/test_utils_response.py index 0caa7b051..c056d3682 100644 --- a/tests/test_utils_response.py +++ b/tests/test_utils_response.py @@ -583,11 +583,7 @@ POST_XTRACTMIME_SCENARIOS = ( ) ), - # Unlike in a web browser, where an attachment Content-Disposition header - # causes the response to be downloaded, and hence MIME sniffing becomes - # irrelevant, in Scrapy those responses are handled the same as any, and - # hence we take the file extension from Content-Disposition into account - # to choose a response class, as a fallback when there is no Content-Type. + # Content-Type triumphes Content-Disposition. *( ( { @@ -597,7 +593,7 @@ POST_XTRACTMIME_SCENARIOS = ( 'Content-Disposition': [ f'attachment; filename="a.{file_extension}"', ], - "Content-Type": {content_type}, + "Content-Type": [content_type], } ), },