()
| 219 | |
| 220 | |
| 221 | def 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 | |
| 231 | def test_query_tornado_httperror_no_response(): |