Skip to main content

Disable network connection for Testing

Project description

Python package to simulate internet failures for testing purposes.

This fork fix error in original repository.

Installation

$ pip install internet-sabotage2

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-sabotage2-0.1.3.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file internet-sabotage2-0.1.3.tar.gz.

File metadata

  • Download URL: internet-sabotage2-0.1.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0

File hashes

Hashes for internet-sabotage2-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9b18bc6d139e3d1c1a5d829cbaf8c31be37f2afa6226fd2a17cca95b51257936
MD5 33873ae2a9452847d032305e4ef7e7ed
BLAKE2b-256 2adbab01610d734488c96d44762cf0d750ec6ec8ba9b4a72d8a467c787b011b6

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