1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

add failing test for requests2.7/gzip issue

This commit is contained in:
Kevin McCarthy
2015-05-05 20:49:12 -10:00
parent 52496cd091
commit 856c38479a
2 changed files with 12 additions and 2 deletions

View 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

View File

@@ -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