尝试
assert "200" in resp.code
或
assert "OK" in resp.reason
在您的测试\u http_client()函数中。
分配给的对象
resp
是AsynchHttpClient,而不是响应本身。要调用响应消息,您需要
resp.code, resp.reason, resp.body, resp.headers
等。
这是你可以打电话给我的东西的清单
http://www.tornadoweb.org/en/stable/httpclient.html#response-objects