📜  在 pytest 上禁用网络 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:06.623000             🧑  作者: Mango

代码示例2
# test_internet.py
def test_your_unconnectable_situation(disable_network):
    response = request.get('http://stackoverflow.com/')
    response.status_code == 400