]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Fix failing tests
authorSamuel Fekete <samuel.fekete@hogarthww.com>
Mon, 3 Jul 2017 14:16:23 +0000 (15:16 +0100)
committerSamuel Fekete <samuel.fekete@gmail.com>
Fri, 13 Jul 2018 15:40:35 +0000 (16:40 +0100)
tests/integration/test_proxy.py
vcr/stubs/__init__.py

index 3212b24549969a399cadde8f64337363ffa68c02..ce67e605ca1b15881bd21b83eb10f7a59e3b1ad1 100644 (file)
@@ -37,6 +37,6 @@ def proxy_server(httpbin):
 
 def test_use_proxy(tmpdir, httpbin, proxy_server):
     '''Ensure that it works with a proxy.'''
-    with vcr.use_cassette(str(tmpdir.join('proxy.yaml'))) as cass:
+    with vcr.use_cassette(str(tmpdir.join('proxy.yaml'))):
         requests.get(httpbin.url, proxies={'http': proxy_server})
         requests.get(httpbin.url, proxies={'http': proxy_server})
index 6ebe2e80d54f29c5372dd25c6c55abec2df172ff..763204ee5639ce39268b9410c5f38d5883daa1cc 100644 (file)
@@ -136,7 +136,7 @@ class VCRConnection(object):
 
     def _uri(self, url):
         """Returns request absolute URI"""
-        if not url.startswith('/'):
+        if url and not url.startswith('/'):
             # Then this must be a proxy request.
             return url
         uri = "{0}://{1}{2}{3}".format(