py.test integration for responses
Project description
Automatically activate responses across your py.test-powered test suite (thus preventing HTTP requests).
If particular tests need access to external domains, you can use the withoutresponses marker:
@pytest.mark.withoutresponses
def test_disabled():
with pytest.raises(ConnectionError):
requests.get('http://responses.invalid')
assert len(responses.calls) == 0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytest-responses-0.1.0.tar.gz
.
File metadata
- Download URL: pytest-responses-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da8c20eea227137e5aeff6dba1243c7ac09ed1c3a01566e1441e1bd39cba44c |
|
MD5 | d4b124be6271b99fc3b6e46439a699bf |
|
BLAKE2b-256 | 8655e45950fe6e7efc2924ed56b59ecad30d8d01386c9d6310b1582f7e717c63 |
File details
Details for the file pytest_responses-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_responses-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6af7cabc5b5cb6b2db5d78da5266197fc551e759f0507054a831ab2851243a2 |
|
MD5 | 5930738abfb3b1d1929a332c17d4a953 |
|
BLAKE2b-256 | 080e87f1d1d858b1526f5de9346a4b00bcdac3cf33b777da3607c2e2c809371c |