Skip to main content

Disable network connection for Testing

Project description

Python package to simulate internet failures for testing purposes.

Instalation

$ pip install internet-sabotage

Usage

from internet_sabotage import no_connection

with no_connection():
    response = requests.get('http://httpbin.org/ip')

or

from internet_sabotage import no_connection

@no_connection
def test_something():
    pass

License

MIT

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

internet-sabotage-0.1.2.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file internet-sabotage-0.1.2.tar.gz.

File metadata

File hashes

Hashes for internet-sabotage-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d5a61c9e769cff76a5f1112eefecaee57c28d5152a3ed88e10c3b57e6f1d0113
MD5 c5eec4871e3c178ac95dbdb13b8270c0
BLAKE2b-256 81366d383b6d42eae8458762a81e1466887642ad6c9cb2f15cb53b08b0d4be6f

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