test_connections.py 文件源码

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

项目:umapi-client.py 作者: adobe-apiplatform 项目源码 文件源码
def test_post_timeout():
    with mock.patch("umapi_client.connection.requests.Session.post") as mock_post:
        mock_post.side_effect = requests.Timeout
        conn = Connection(**dict(mock_connection_params, retry_max_attempts=2))
        pytest.raises(UnavailableError, conn.make_call, "", [3, 5])
        assert mock_post.call_count == 2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号