Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

is_gzipped: Separated tests again.

Joakim Uddholm23f99e98c4cf
diff --git a/tests/test_utils_gz.py b/tests/test_utils_gz.py
index a9bd29bae..2b47bf8da 100644
--- a/tests/test_utils_gz.py
+++ b/tests/test_utils_gz.py
@@ -29,10 +29,12 @@ class GunzipTest(unittest.TestCase):
text = gunzip(f.read())
assert text.endswith(b'</html>')
- def test_is_gzipped_right(self):
+ def test_is_x_gzipped_right(self):
hdrs = Headers({"Content-Type": "application/x-gzip"})
r1 = Response("http://www.example.com", headers=hdrs)
self.assertTrue(is_gzipped(r1))
+
+ def test_is_gzipped_right(self):
hdrs = Headers({"Content-Type": "application/gzip"})
r1 = Response("http://www.example.com", headers=hdrs)
self.assertTrue(is_gzipped(r1))