mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Fix pyflakes and pep8 errors
Use extra asserts to use previously unused variables in tests, such as `cass` and `response`. Fix only pyflakes errors in docs/conf.py
This commit is contained in:
@@ -42,6 +42,8 @@ def test_flickr_multipart_upload():
|
||||
data = r.read()
|
||||
h.close()
|
||||
|
||||
return data
|
||||
|
||||
with vcr.use_cassette('fixtures/vcr_cassettes/flickr.yaml') as cass:
|
||||
_pretend_to_be_flickr_library()
|
||||
assert len(cass) == 1
|
||||
@@ -63,7 +65,8 @@ def test_cookies(tmpdir):
|
||||
testfile = str(tmpdir.join('cookies.yml'))
|
||||
with vcr.use_cassette(testfile):
|
||||
s = requests.Session()
|
||||
r1 = s.get("http://httpbin.org/cookies/set?k1=v1&k2=v2")
|
||||
s.get("http://httpbin.org/cookies/set?k1=v1&k2=v2")
|
||||
|
||||
r2 = s.get("http://httpbin.org/cookies")
|
||||
assert len(r2.json()['cookies']) == 2
|
||||
|
||||
@@ -81,9 +84,8 @@ def test_xmlrpclib(tmpdir):
|
||||
roundup_server = xmlrpc_client.ServerProxy('http://bugs.python.org/xmlrpc', allow_none=True)
|
||||
original_schema = roundup_server.schema()
|
||||
|
||||
with vcr.use_cassette(str(tmpdir.join('xmlrpcvideo.yaml'))) as cassette:
|
||||
with vcr.use_cassette(str(tmpdir.join('xmlrpcvideo.yaml'))):
|
||||
roundup_server = xmlrpc_client.ServerProxy('http://bugs.python.org/xmlrpc', allow_none=True)
|
||||
second_schema = roundup_server.schema()
|
||||
|
||||
assert original_schema == second_schema
|
||||
|
||||
|
||||
Reference in New Issue
Block a user