mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +00:00
add unit tests
This commit is contained in:
12
tests/unit/test_cassettes.py
Normal file
12
tests/unit/test_cassettes.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import yaml
|
||||
from vcr.cassette import Cassette
|
||||
|
||||
def test_cassette_load(tmpdir):
|
||||
a_file = tmpdir.join('test_cassette.yml')
|
||||
a_file.write(yaml.dumps([
|
||||
{'request':'foo', 'response':'bar'}
|
||||
]))
|
||||
a_cassette = Cassette.load(a_file)
|
||||
assert a_cassette._requests
|
||||
assert a_cassette._responses
|
||||
|
||||
Reference in New Issue
Block a user