Cover ResponseTypes.from_args fallbacks

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
This commit is contained in:
Mridankan Mandal 2026-07-22 17:29:09 +05:30
parent 934d0ab7be
commit 24f5b30a56
No known key found for this signature in database
GPG Key ID: C24AD565E950FF59
1 changed files with 5 additions and 0 deletions

View File

@ -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)