1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-10 17:45:35 +00:00

Spelling fixes

This commit is contained in:
Ville Skyttä
2021-08-16 06:56:36 +03:00
parent d4927627c3
commit 678d56f608
6 changed files with 24 additions and 24 deletions

View File

@@ -208,7 +208,7 @@ def test_nesting_cassette_context_managers(*args):
)
assert_get_response_body_is("first_response")
# Make sure a second cassette can supercede the first
# Make sure a second cassette can supersede the first
with Cassette.use(path="test") as second_cassette:
with mock.patch.object(second_cassette, "play_response", return_value=second_response):
assert_get_response_body_is("second_response")
@@ -310,16 +310,16 @@ def test_func_path_generator():
def test_use_as_decorator_on_coroutine():
original_http_connetion = httplib.HTTPConnection
original_http_connection = httplib.HTTPConnection
@Cassette.use(inject=True)
def test_function(cassette):
assert httplib.HTTPConnection.cassette is cassette
assert httplib.HTTPConnection is not original_http_connetion
assert httplib.HTTPConnection is not original_http_connection
value = yield 1
assert value == 1
assert httplib.HTTPConnection.cassette is cassette
assert httplib.HTTPConnection is not original_http_connetion
assert httplib.HTTPConnection is not original_http_connection
value = yield 2
assert value == 2
@@ -333,15 +333,15 @@ def test_use_as_decorator_on_coroutine():
def test_use_as_decorator_on_generator():
original_http_connetion = httplib.HTTPConnection
original_http_connection = httplib.HTTPConnection
@Cassette.use(inject=True)
def test_function(cassette):
assert httplib.HTTPConnection.cassette is cassette
assert httplib.HTTPConnection is not original_http_connetion
assert httplib.HTTPConnection is not original_http_connection
yield 1
assert httplib.HTTPConnection.cassette is cassette
assert httplib.HTTPConnection is not original_http_connetion
assert httplib.HTTPConnection is not original_http_connection
yield 2
assert list(test_function()) == [1, 2]

View File

@@ -6,7 +6,7 @@ from vcr.cassette import Cassette
class TestVCRConnection:
def test_setting_of_attributes_get_propogated_to_real_connection(self):
def test_setting_of_attributes_get_propagated_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"

View File

@@ -31,7 +31,7 @@ def test_vcr_use_cassette():
function()
assert mock_cassette_load.call_args[1]["record_mode"] == test_vcr.record_mode
# Ensure that explicitly provided arguments still supercede
# Ensure that explicitly provided arguments still supersede
# those on the vcr.
new_record_mode = mock.Mock()
@@ -226,7 +226,7 @@ def test_with_current_defaults():
def test_cassette_library_dir_with_decoration_and_no_explicit_path():
library_dir = "/libary_dir"
library_dir = "/library_dir"
vcr = VCR(inject_cassette=True, cassette_library_dir=library_dir)
@vcr.use_cassette()
@@ -237,7 +237,7 @@ def test_cassette_library_dir_with_decoration_and_no_explicit_path():
def test_cassette_library_dir_with_decoration_and_explicit_path():
library_dir = "/libary_dir"
library_dir = "/library_dir"
vcr = VCR(inject_cassette=True, cassette_library_dir=library_dir)
@vcr.use_cassette(path="custom_name")
@@ -248,7 +248,7 @@ def test_cassette_library_dir_with_decoration_and_explicit_path():
def test_cassette_library_dir_with_decoration_and_super_explicit_path():
library_dir = "/libary_dir"
library_dir = "/library_dir"
vcr = VCR(inject_cassette=True, cassette_library_dir=library_dir)
@vcr.use_cassette(path=os.path.join(library_dir, "custom_name"))
@@ -259,7 +259,7 @@ def test_cassette_library_dir_with_decoration_and_super_explicit_path():
def test_cassette_library_dir_with_path_transformer():
library_dir = "/libary_dir"
library_dir = "/library_dir"
vcr = VCR(
inject_cassette=True, cassette_library_dir=library_dir, path_transformer=lambda path: path + ".json"
)