# pytest-responses **Repository Path**: mirrors_getsentry/pytest-responses ## Basic Information - **Project Name**: pytest-responses - **Description**: py.test integration for responses - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README pytest-responses ================ .. image:: https://img.shields.io/pypi/v/pytest-responses.svg :target: https://pypi.python.org/pypi/pytest-responses/ .. image:: https://github.com/getsentry/pytest-responses/workflows/Test/badge.svg :target: https://github.com/getsentry/pytest-responses/actions/workflows/test.yml Automatically activate responses across your py.test-powered test suite (thus preventing HTTP requests). .. sourcecode:: shell $ pip install pytest-responses If particular tests need access to external domains, you can use the ``withoutresponses`` marker: .. sourcecode:: python @pytest.mark.withoutresponses def test_disabled(): with pytest.raises(ConnectionError): requests.get('http://responses.invalid') assert len(responses.calls) == 0 Additionally, you can use the responses fixture: .. sourcecode:: python def test_enabled(responses): with pytest.raises(ConnectionError): requests.get('http://responses.invalid') assert len(responses.calls) == 1