mirror of https://github.com/scrapy/scrapy.git
Fix issues reported by static checks
This commit is contained in:
parent
3fc9b732cb
commit
d2accf2e39
|
|
@ -32,7 +32,8 @@ _CONTENT_ENCODING_MIME_TYPES = {
|
|||
'gzip': b'application/gzip',
|
||||
}
|
||||
_MIME_TYPES = MimeTypes()
|
||||
_MIME_TYPES.readfp(StringIO(get_data('scrapy', 'mime.types').decode()))
|
||||
_scrapy_mime_data = get_data('scrapy', 'mime.types') or b''
|
||||
_MIME_TYPES.readfp(StringIO(_scrapy_mime_data.decode()))
|
||||
|
||||
|
||||
def _is_other_text_mime_type(mime_type):
|
||||
|
|
|
|||
|
|
@ -174,8 +174,8 @@ class ResponseTypesTest(unittest.TestCase):
|
|||
def test_custom_mime_types_loaded(self):
|
||||
"""Check that mime.types files shipped with Scrapy are loaded."""
|
||||
self.assertEqual(
|
||||
_MIME_TYPES.guess_type('x.scrapytest')[0],
|
||||
'x-scrapy/test',
|
||||
_MIME_TYPES.guess_type('x.scrapytest')[0],
|
||||
'x-scrapy/test',
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue