MCPcopy Index your code
hub / github.com/saltstack/salt / test_query_error_handling

Function test_query_error_handling

tests/pytests/unit/utils/test_http.py:221–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219
220
221def test_query_error_handling():
222 ret = http.query("http://127.0.0.1:0")
223 assert isinstance(ret, dict)
224 assert isinstance(ret.get("error", None), str)
225 # use RFC6761 invalid domain that does not exist
226 ret = http.query("http://myfoobardomainthatnotexist.invalid")
227 assert isinstance(ret, dict)
228 assert isinstance(ret.get("error", None), str)
229
230
231def test_query_tornado_httperror_no_response():

Callers

nothing calls this directly

Calls 2

queryMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected