1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 17:15:35 +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