test_httpclient.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:st-python-api 作者: Secure-Trading 项目源码 文件源码
def test_handle_exception(self):
        tests = [(RequestException(), [''], "7", "7"),
                 (ConnectTimeout(), [''], "7", "7"),
                 (RequestsConnectionError(), [''], "7", "7"),
                 (Exception("Any other exception"),
                  ["Any other exception"],
                  "8 Any other exception", "8"
                  ),
                 ]

        for exception, exp_data, exp_english, exp_code in tests:
            self.check_st_exception(ConnectionError,
                                    exp_data, exp_english, exp_code,
                                    self.http_client._handle_exception,
                                    func_args=(exception,))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号