mirror of https://github.com/scrapy/scrapy.git
Cover ResponseTypes.from_args fallbacks
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
This commit is contained in:
parent
934d0ab7be
commit
24f5b30a56
|
|
@ -126,7 +126,12 @@ class TestResponseTypes:
|
|||
{"url": "http://example.com/data.json", "filename": "index.html"},
|
||||
JsonResponse,
|
||||
),
|
||||
(
|
||||
{"url": "http://example.com/data.unknown", "filename": "index.html"},
|
||||
HtmlResponse,
|
||||
),
|
||||
({"filename": "data.xml", "body": b"<html></html>"}, XmlResponse),
|
||||
({"filename": "data.unknown", "body": b"<html></html>"}, HtmlResponse),
|
||||
]
|
||||
for source, cls in mappings:
|
||||
retcls = responsetypes.from_args(**source)
|
||||
|
|
|
|||
Loading…
Reference in New Issue