A pytest plugin that allows to record network interactions via VCR.py
Project description
WIP
A pytest plugin that allows to record network interactions via VCR.py.
Features
Straightforward pytest.mark.vcr, that reflects VCR.use_cassettes API;
Combining multiple VCR cassettes;
Usage
import pytest
import requests
@pytest.mark.vcr("/path/to/ip.yaml", "/path/to/get.yaml")
def test_multiple():
assert requests.get("http://httpbin.org/get").text == "GET CONTENT"
assert requests.get("http://httpbin.org/ip").text == "IP CONTENT"
# cassettes/test_single.yaml will be used
def test_single():
assert requests.get("http://httpbin.org/get").text == "GET CONTENT"
Python support
Pytest-recording supports Python 2.7, 3.5, 3.6, 3.7 and 3.8.
License
The code in this project is licensed under MIT license. By contributing to pytest-recording, you agree that your contributions will be licensed under its MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pytest_recording-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb6673021b2e9272fc6bbfd6865aa0f7e98908c2e58409d71b5e83373ddc28ea |
|
MD5 | 0c1b71e786361bbe42d6b6de9a6f2b86 |
|
BLAKE2b-256 | 2ecb7cf35353abb3ec4d7a997b94a8a432b51327fc37b84ade9a5449cf45e5ca |