Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

disable network on pytest

# test_internet.py
def test_your_unconnectable_situation(disable_network):
    response = request.get('http://stackoverflow.com/')
    response.status_code == 400
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #network #pytest
ADD COMMENT
Topic
Name
2+8 =