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.1.0-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: pytest_recording-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 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/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pytest_recording-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb6673021b2e9272fc6bbfd6865aa0f7e98908c2e58409d71b5e83373ddc28ea
MD5 0c1b71e786361bbe42d6b6de9a6f2b86
BLAKE2b-256 2ecb7cf35353abb3ec4d7a997b94a8a432b51327fc37b84ade9a5449cf45e5ca

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