mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Add failing test for session still being attached to cassette after context is gone.
This commit is contained in:
@@ -152,6 +152,18 @@ def test_https_with_cert_validation_disabled(tmpdir):
|
||||
requests.get('https://httpbin.org', verify=False)
|
||||
|
||||
|
||||
def test_session_can_make_requests_after_requests_unpatched(tmpdir):
|
||||
with vcr.use_cassette(str(tmpdir.join('test_session_after_unpatched.yaml'))):
|
||||
session = requests.session()
|
||||
session.get('http://httpbin.org/get')
|
||||
|
||||
with vcr.use_cassette(str(tmpdir.join('test_session_after_unpatched.yaml'))):
|
||||
session = requests.session()
|
||||
session.get('http://httpbin.org/get')
|
||||
|
||||
session.get('http://httpbin.org/status/200')
|
||||
|
||||
|
||||
def test_nested_context_managers_with_session_created_before_first_nesting(scheme, tmpdir):
|
||||
'''
|
||||
This tests ensures that a session that was created while one cassette was
|
||||
|
||||
Reference in New Issue
Block a user