pip install httpretty python import httpretty python httpretty.enable() python httpretty.register_uri(httpretty.GET, "http://example.com", body="Hello, world!") python import requests response = requests.get("http://example.com") python assert response.status_code == 200 python httpretty.disable()


上一篇:
下一篇:
切换中文