Minor adjustment to the test case in tests/test_downloadermiddleware_httpcompression.py

This commit is contained in:
P. Chen 2020-10-05 23:55:48 +01:00
parent 50e1f35d1f
commit 6032a9a310
No known key found for this signature in database
GPG Key ID: E3353B0B8B3E8B49
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,8 @@ class HttpCompressionTest(TestCase):
newresponse = self.mw.process_response(request, response, self.spider)
if raw_content is None:
raw_content = newresponse.body
assert raw_content == newresponse.body
else:
assert raw_content == newresponse.body
assert newresponse is not response
assert newresponse.body.startswith(b"<!DOCTYPE")
assert 'Content-Encoding' not in newresponse.headers