]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
add failing test for requests2.7/gzip issue
authorKevin McCarthy <me@kevinmccarthy.org>
Wed, 6 May 2015 06:49:12 +0000 (20:49 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Wed, 6 May 2015 06:49:12 +0000 (20:49 -1000)
tests/integration/test_wild.py
tox.ini

index 06be0f56dcacd5e93a5822edf726bd593071e3bc..e32e1efa6e6a08be466406144c1d3fba807f1802 100644 (file)
@@ -64,3 +64,11 @@ def test_cookies(tmpdir):
         r1 = s.get("http://httpbin.org/cookies/set?k1=v1&k2=v2")
         r2 = s.get("http://httpbin.org/cookies")
         assert len(r2.json()['cookies']) == 2
+
+
+def test_amazon_doctype(tmpdir):
+    # amazon gzips its homepage.  For some reason, in requests 2.7, it's not
+    # getting gunzipped.
+    with vcr.use_cassette(str(tmpdir.join('amz.yml'))):
+        r = requests.get('http://www.amazon.com')
+    assert 'html' in r.text
diff --git a/tox.ini b/tox.ini
index 301728a5a74f4a3e7beebe6ecd7223687c22f588..50cecc391330845343da9cd587b21461c19ad236 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = {py26,py27,py33,py34,pypy}-{requests27,requests25,requests24,requests23,requests22,requests1,httplib2,urllib317,urllib319,urllib3110,boto}
+envlist = {py26,py27,py33,py34,pypy}-{requests27,requests26,requests25,requests24,requests23,requests22,requests1,httplib2,urllib317,urllib319,urllib3110,boto}
 
 [testenv]
 commands =
@@ -15,12 +15,14 @@ deps =
     pytest
     pytest-localserver
     PyYAML
+    lxml
     requests1: requests==1.2.3
+    requests27: requests==2.7.0
+    requests22: requests==2.6.0
     requests25: requests==2.5.0
     requests24: requests==2.4.0
     requests23: requests==2.3.0
     requests22: requests==2.2.1
-    requests27: requests==2.7.0
     httplib2: httplib2
     urllib317: urllib3==1.7.1
     urllib319: urllib3==1.9.1