From 66e3b4004333140ae37841786fb490ce14c2dc21 Mon Sep 17 00:00:00 2001 From: Akshay Sharma Date: Mon, 20 Sep 2021 22:44:13 -0400 Subject: [PATCH] Add more tests --- tests/test_responsetypes.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_responsetypes.py b/tests/test_responsetypes.py index 15a7ea680..16ce36233 100644 --- a/tests/test_responsetypes.py +++ b/tests/test_responsetypes.py @@ -120,8 +120,15 @@ class ResponseTypesTest(unittest.TestCase): 'Content-Type': ['text/html']})}, HtmlResponse), ({'body': b'Some plain text', 'headers': Headers({'Content-Type': 'application/octet-stream'})}, TextResponse), - ({'url': b'http://www.example.com/page/file.html', 'headers': Headers({'Content-Type': 'application/octet-stream'})}, - TextResponse), + ({'url': b'http://www.example.com/page/file.html', + 'headers': Headers({'Content-Type': 'application/octet-stream'})}, TextResponse), + ({'url': 'http://www.example.com/item/file.xml', + 'headers': Headers({'Content-Type': 'application/octet-stream'})}, TextResponse), + ({'url': 'http://www.example.com/item/file.html', + 'headers': Headers({'Content-Type': 'application/octet-stream'})}, TextResponse), + ({'url': 'http://www.example.com/item/file.xml', + 'headers': Headers({'Content-Disposition': ['attachment; filename="data.xml.gz"'], + 'Content-Type': 'application/octet-stream'})}, TextResponse), ({'body': b'\x0c\x1b'}, TextResponse), ({'body': b'this is not '}, TextResponse), ({'body': b'this is not