mirror of https://github.com/scrapy/scrapy.git
Add more tests
This commit is contained in:
parent
c81605abe6
commit
66e3b40043
|
|
@ -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 <html>'}, TextResponse),
|
||||
({'body': b'this is not <?xml'}, TextResponse),
|
||||
|
|
|
|||
Loading…
Reference in New Issue