mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Format with line length 110 to match flake8 make black part of linting check Update travis spec for updated black requirements Add diff output for black on failure update changelog
18 lines
783 B
Python
18 lines
783 B
Python
from vcr.stubs import VCRHTTPSConnection
|
|
from vcr.compat import mock
|
|
from vcr.cassette import Cassette
|
|
|
|
|
|
class TestVCRConnection(object):
|
|
def test_setting_of_attributes_get_propogated_to_real_connection(self):
|
|
vcr_connection = VCRHTTPSConnection("www.examplehost.com")
|
|
vcr_connection.ssl_version = "example_ssl_version"
|
|
assert vcr_connection.real_connection.ssl_version == "example_ssl_version"
|
|
|
|
@mock.patch("vcr.cassette.Cassette.can_play_response_for", return_value=False)
|
|
def testing_connect(*args):
|
|
vcr_connection = VCRHTTPSConnection("www.google.com")
|
|
vcr_connection.cassette = Cassette("test", record_mode="all")
|
|
vcr_connection.real_connection.connect()
|
|
assert vcr_connection.real_connection.sock is not None
|