def test_sync_client_error(self):
# Synchronous HTTPClient raises errors directly; no need for
# response.rethrow()
with self.assertRaises(HTTPError) as assertion:
self.http_client.fetch(self.get_url('/notfound'))
self.assertEqual(assertion.exception.code, 404)
httpclient_test.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录