--- id: vcrpy-unittest version: "0.1.7" license: MIT license_treatment: permissive maintenance: abandoned --- # vcrpy-unittest — Python unittest integration for vcr.py License: permissive · Maintenance: abandoned · Downloads: 87.8K/mo ## What it is and what it does vcrpy-unittest bridges vcrpy and Python's unittest framework by providing VCRTestCase, a base class that automatically handles HTTP cassette recording and playback. Instead of manually wrapping test methods with VCR context managers, you inherit from VCRTestCase and write normal unittest code; the class intercepts HTTP calls, records them to YAML files on first run, and replays them on subsequent runs. It also exposes the cassette object as self.cassette so you can make assertions about recorded interactions. The package is lightweight—it depends only on vcrpy—and offers customization hooks (_get_vcr_kwargs, _get_cassette_library_dir, _get_cassette_name, _get_vcr) to control cassette location, naming, and VCR configuration. A VCRMixin variant is available for cases where inheriting from VCRTestCase conflicts with existing class hierarchies. Use it for: - Write integration tests that record live HTTP interactions on first run, then replay recorded responses in CI/CD pipelines without network access. - Test code that depends on external APIs by recording interactions once, then running tests offline with deterministic responses. - Verify HTTP request details by inspecting self.cassette.requests and self.cassette after a test executes. - Add custom VCR matchers to control how recorded requests are matched during playback. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a unittest base class that automatically records and replays HTTP interactions using vcrpy, eliminating manual cassette management in test code. No. The package is abandoned (last release 2018-09-25, repository archived) with no activity for over 2880 days. Compatibility with modern Python versions and current vcrpy releases is unverified. While the concept is sound and the MIT license is permissive, the lack of maintenance creates risk for new projects. Consider using vcrpy directly with unittest, or evaluate actively maintained alternatives. ## Install pip install vcrpy-unittest uv add vcrpy-unittest poetry add vcrpy-unittest ## Installing vcrpy-unittest Before you install: Low install friction with a single runtime dependency on vcrpy. However, the package is abandoned—last release was 2018-09-25 and the repository was archived. No updates have been made in over 2880 days, so compatibility with modern Python or vcrpy versions is uncertain. License in practice: MIT license is permissive and imposes no significant restrictions on use, modification, or distribution. Suitable for both open-source and proprietary projects. Quickstart: pip install vcrpy-unittest from vcr_unittest import VCRTestCase class MyTestCase(VCRTestCase): def test_something(self): self.assertEqual(len(self.cassette), 1) Requires vcrpy as a runtime dependency; cassettes are stored in a 'cassettes' subdirectory by default relative to the test file. Verify before relying: - Compatibility with current vcrpy versions and modern Python releases (last tested with Python 3.7) - Whether the package works with unittest features added after 2018 - Active maintenance status or community forks that may have continued development ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 87.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags unittest http mocking, vcr.py integration, http cassette recording, test http interactions, http replay testing, mock http requests testing, vcr unittest base class, http-mocking, test-fixtures [View on SkillFed](https://skillfed.io/packages/vcrpy-unittest) · [View on PyPI](https://pypi.org/project/vcrpy-unittest/)