Metadata-Version: 2.4
Name: pytest-responses
Version: 0.4.0
Summary: py.test integration for responses
Home-page: https://github.com/getsentry/pytest-responses
Author: David Cramer
Author-email: dcramer@gmail.com
License: Apache 2.0
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Classifier: Framework :: Pytest
License-File: LICENSE
Requires-Dist: responses
Requires-Dist: pytest>=2.5
Provides-Extra: tests
Requires-Dist: flake8; extra == "tests"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

pytest-responses
================

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
