tests.py 文件源码

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

项目:quadriga 作者: joowani 项目源码 文件源码
def test_get_orders(requests_post, logger):
    client = build_client()
    output = client.get_orders()
    assert output == test_body
    requests_post.assert_called_with(
        url=build_url('/open_orders'),
        json={
            'book': test_book,
            'key': test_key,
            'nonce': test_nonce,
            'signature': mock.ANY
        }
    )
    logger.debug.assert_called_with(
        "[client: test_client_id] get user's open orders for btc_usd")

    with pytest.raises(InvalidOrderBookError):
        client.get_orders(book='invalid_book')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号