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:
@@ -1,6 +1,7 @@
|
||||
import vcr
|
||||
import six.moves.http_client as httplib
|
||||
|
||||
|
||||
def _headers_are_case_insensitive():
|
||||
conn = httplib.HTTPConnection('httpbin.org')
|
||||
conn.request('GET', "/cookies/set?k1=v1")
|
||||
@@ -12,6 +13,7 @@ def _headers_are_case_insensitive():
|
||||
cookie_data2 = r2.getheader('Set-Cookie')
|
||||
return cookie_data1 == cookie_data2
|
||||
|
||||
|
||||
def test_case_insensitivity(tmpdir):
|
||||
testfile = str(tmpdir.join('case_insensitivity.yml'))
|
||||
# check if headers are case insensitive outside of vcrpy
|
||||
@@ -25,12 +27,14 @@ def test_case_insensitivity(tmpdir):
|
||||
# behavior should be the same both inside and outside
|
||||
assert outside == inside == inside2
|
||||
|
||||
|
||||
def _multiple_header_value(httpserver):
|
||||
conn = httplib.HTTPConnection('%s:%s' % httpserver.server_address)
|
||||
conn.request('GET', "/")
|
||||
r = conn.getresponse()
|
||||
return r.getheader('foo')
|
||||
|
||||
|
||||
def test_multiple_headers(tmpdir, httpserver):
|
||||
testfile = str(tmpdir.join('multiple_headers.yaml'))
|
||||
httpserver.serve_content('Hello!', headers=[('foo', 'bar'), ('foo', 'baz')])
|
||||
|
||||
Reference in New Issue
Block a user