mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Added more test for persist
This commit is contained in:
@@ -12,3 +12,13 @@ def test_load_cassette_with_old_cassettes(cassette_path, serializer):
|
|||||||
with pytest.raises(ValueError) as excinfo:
|
with pytest.raises(ValueError) as excinfo:
|
||||||
vcr.persist.load_cassette(cassette_path, serializer)
|
vcr.persist.load_cassette(cassette_path, serializer)
|
||||||
assert "run the migration script" in excinfo.exconly()
|
assert "run the migration script" in excinfo.exconly()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("cassette_path, serializer", [
|
||||||
|
('tests/fixtures/migration/not_cassette.txt', jsonserializer),
|
||||||
|
('tests/fixtures/migration/not_cassette.txt', yamlserializer),
|
||||||
|
])
|
||||||
|
def test_load_cassette_with_invalid_cassettes(cassette_path, serializer):
|
||||||
|
with pytest.raises(Exception) as excinfo:
|
||||||
|
vcr.persist.load_cassette(cassette_path, serializer)
|
||||||
|
assert "run the migration script" not in excinfo.exconly()
|
||||||
|
|||||||
Reference in New Issue
Block a user