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. The library is working at 100%.

Installation

$ pip install internet-sabotage3

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-sabotage3-0.1.6.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file internet-sabotage3-0.1.6.tar.gz.

File metadata

  • Download URL: internet-sabotage3-0.1.6.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

File hashes

Hashes for internet-sabotage3-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c42a6ac3edf145500ceb0b57045385999958fe6565011ecad5bb96ad8848dccf
MD5 6503501468338dd33b88342c2a2092a8
BLAKE2b-256 ce649d63822630400216be5cf621f6292fea5980f065f1bd2b7eb24eaac0de4f

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