Skip to main content

A pytest plugin that allows to record network interactions via VCR.py

Project description

codecov Build Version Python versions License

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


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

If you're not sure about the file name format, learn more about wheel file names.

pytest_recording-0.2.0-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest_recording-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pytest_recording-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for pytest_recording-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3daf807b8309a1cd7d563cc5093c69706fe92224ad2921b20dc408958471a26d
MD5 966105f26e83313c47eee5e83178cc75
BLAKE2b-256 bdf58b5b3878c3d818f33247652e5d26904eb387292927e4e7e21eda9d25359b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page